8
0

Reformat documentation

Dieser Commit ist enthalten in:
Stéphane Goetz
2020-04-25 14:44:43 +02:00
Ursprung ec8530b264
Commit 4d312a44e6
21 geänderte Dateien mit 2455 neuen und 2421 gelöschten Zeilen

Datei anzeigen

@ -1,17 +1,14 @@
As we support CommonMark, a broad range of markdown features is available to you.
Many of the features shown below were known as Github Flavored Markdown.
We all like making lists
------------------------
## We all like making lists
The above header should be an H2 tag. Now, for a list of fruits:
* Red Apples
* Purple Grapes
* Green Kiwifruits
- Red Apples
- Purple Grapes
- Green Kiwifruits
Let's get crazy:
@ -27,18 +24,17 @@ Let's get crazy:
What about some code **in** a list? That's insane, right?
1. In Ruby you can map like this:
1. In Ruby you can map like this:
['a', 'b'].map { |x| x.uppercase }
2. In Rails, you can do a shortcut:
2. In Rails, you can do a shortcut:
['a', 'b'].map(&:uppercase)
Some people seem to like definition lists
I am a robot
------------
## I am a robot
Maybe you want to print `robot` to the console 1000 times. Why not?
@ -54,8 +50,7 @@ How about we throw some angle braces and ampersands in there?
© 2004 Foo Corporation
</div>
Set in stone
------------
## Set in stone
Preformatted blocks are useful for ASCII art:
@ -73,8 +68,7 @@ Preformatted blocks are useful for ASCII art:
___|_____________
</pre>
Playing the blame game
----------------------
## Playing the blame game
If you need to blame someone, the best way to do so is by quoting them:
@ -92,26 +86,23 @@ Or perhaps someone a little less eloquent:
> just put me under the spot here, and maybe I'm not as quick on my feet
> as I should be in coming up with one.
Table for two
-------------
## Table for two
ID | Name | Rank
---|:------:|------:
1 | Tom Preston-Werner | Awesome
2 | Albert Einstein | Nearly as awesome
| ID | Name | Rank |
| --- | :----------------: | ----------------: |
| 1 | Tom Preston-Werner | Awesome |
| 2 | Albert Einstein | Nearly as awesome |
Crazy linking action
--------------------
## Crazy linking action
I get 10 times more traffic from [Google] [1] than from
[Yahoo] [2] or [MSN] [3].
I get 10 times more traffic from [Google][1] than from
[Yahoo][2] or [MSN][3].
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
[1]: http://google.com/ "Google"
[2]: http://search.yahoo.com/ "Yahoo Search"
[3]: http://search.msn.com/ "MSN Search"
Images
------
## Images
Here's an image.
@ -119,4 +110,4 @@ Here's an image.
Note: to use images on a landing page (index.md), prefix the image URL with the name of the directory it appears in, omitting the numerical prefix used to order the sections. For example in this section, to display this image on the landing page (index.md), the URL for the image would be "Features/sampleimage.png" to display the same image.
*View the [source of this content](https://github.com/dauxio/daux.io/blob/master/docs/01_Features/CommonMark_compliant.md).*
_View the [source of this content](https://github.com/dauxio/daux.io/blob/master/docs/01_Features/CommonMark_compliant.md)._

Datei anzeigen

@ -1,4 +1,3 @@
As you can see on the top of this page, you can add "Edit on Github" links to your pages, this feature can be enabled with a single parameter.
The value has to be the path to the root of your documentation folder in your repository.
@ -7,12 +6,11 @@ In the value you see below, Daux's documentation is in the `docs` folder in the
Daux.io will handle the rest
```json
{
"html": {
"edit_on_github": "dauxio/daux.io/blob/master/docs"
}
"html": {
"edit_on_github": "dauxio/daux.io/blob/master/docs"
}
}
```
@ -22,14 +20,13 @@ While GitHub is the most popular, it isn't the only, collaborative VCS out there
As long as you can refer your files by a URL, you can create an edit link for your VCS with the following configuration:
```json
{
"html": {
"edit_on": {
"name": "Bitbucket",
"basepath": "https://bitbucket.org/dauxio/daux.io/src/master/docs"
"html": {
"edit_on": {
"name": "Bitbucket",
"basepath": "https://bitbucket.org/dauxio/daux.io/src/master/docs"
}
}
}
}
```

Datei anzeigen

@ -2,9 +2,9 @@ If you want to create a beautiful landing page for your project, create a `_inde
```json
{
"title": "Daux.io",
"tagline": "The Easiest Way To Document Your Project",
"image": "app.png"
"title": "Daux.io",
"tagline": "The Easiest Way To Document Your Project",
"image": "app.png"
}
```
@ -14,8 +14,8 @@ To disable the automatic landing page, you can set `auto_landing` to false in th
```json
{
"html": {
"auto_landing": false
}
"html": {
"auto_landing": false
}
}
```

Datei anzeigen

@ -10,7 +10,6 @@ The easiest is to use PHP's built-in server.
For that i've included a short command, run `daux serve` in the projects folder to start the local web server. By default the server will run at: <a href="http://localhost:8085" target="_blank">http://localhost:8085</a>
## Running Remotely
### Clean URLs configuration
@ -20,9 +19,9 @@ To enable the same, set the toggle in the `config.json` file in the `/docs` fold
```json
{
"live": {
"clean_urls": true
}
"live": {
"clean_urls": true
}
}
```
@ -70,8 +69,8 @@ server {
If you have set up a local or remote IIS web site, you may need a `web.config` with:
* A rewrite configuration, for handling clean urls.
* A mime type handler for less files, if using a custom theme.
- A rewrite configuration, for handling clean urls.
- A mime type handler for less files, if using a custom theme.
### Clean URLs
@ -79,20 +78,32 @@ The `web.config` needs an entry for `<rewrite>` under `<system.webServer>`:
```xml
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add
input="{REQUEST_FILENAME}"
matchType="IsFile"
negate="true"
/>
<add
input="{REQUEST_FILENAME}"
matchType="IsDirectory"
negate="true"
/>
</conditions>
<action
type="Rewrite"
url="index.php"
appendQueryString="false"
/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
```
@ -114,4 +125,4 @@ ENTRYPOINT [ "php", "-S", "0.0.0.0:80", "index.php" ]
When you add this to a `Dockerfile` and run `docker build --name my-daux-doc .` and then `docker --rm run -p 8000:80 my-daux-doc`
You can access your documentation at `localhost:8000`
You can access your documentation at `localhost:8000`

Datei anzeigen

@ -4,11 +4,12 @@ Add this to your config.json :
```json
{
"languages": { "en": "English", "de": "German" }
"languages": { "en": "English", "de": "German" }
}
```
You will the need separate directories for each language in `docs/` folder.
```
├── docs/
│ ├── _index.md

Datei anzeigen

@ -1,21 +1,21 @@
Daux.io is extendable and comes by default with three export formats:
- Export to HTML
- Export all documentation in a single HTML page
- Upload to your Atlassian Confluence server
- Export to HTML
- Export all documentation in a single HTML page
- Upload to your Atlassian Confluence server
## Feature Matrix
Feature | HTML | Single Page HTML | Confluence
--------------:|:----:|:----------------:|:----------:
Multilanguage | √ | X (Planned) | X
Landing Pages | √ | X | X
Index Pages | || √
Internal Links | √ | X (Planned) | √
Code Highlight | √ | X (Planned) | √ (Using macros)
Live Mode | | X | X
Pages Ordering | √ | √ | X (API Limitation)
Google / Piwik analytics | √ | √ | √ (Configured on Conflence)
| Feature | HTML | Single Page HTML | Confluence |
| -----------------------: | :--: | :--------------: | :-------------------------: |
| Multilanguage | √ | X (Planned) | X |
| Landing Pages | √ | X | X |
| Index Pages | √ | | √ |
| Internal Links | √ | X (Planned) | √ |
| Code Highlight | | X (Planned) | √ (Using macros) |
| Live Mode | | X | X |
| Pages Ordering | √ | | X (API Limitation) |
| Google / Piwik analytics | √ | √ | √ (Configured on Conflence) |
## Confluence Example

Datei anzeigen

@ -1,4 +1,3 @@
## Navigation
The navigation is generated automatically with all pages that end with `.md` or `.markdown`
@ -12,21 +11,21 @@ For example, `/docs/02_Examples` has a landing page for that section since there
## Sorting
To sort your files and folders in a specific way, you can prefix them with a number and underscore, e.g. `/docs/01_Hello_World.md` and `/docs/05_Features.md`.
This will list *Hello World* before *Features*, overriding the default alpha-numeric sorting.
This will list _Hello World_ before _Features_, overriding the default alpha-numeric sorting.
The numbers will be stripped out of the navigation and urls. For the file `6 Ways to Get Rich`, you can use `/docs/_6_Ways_to_Get_Rich.md`
You might also wish to stick certain links to the bottom of a page.
You can do so by prefixing the file name with a '-', e.g. a new file `/docs/-Contact_Us.md` will always appear at the bottom of the current list.
You can do so by prefixing the file name with a '-', e.g. a new file `/docs/-Contact_Us.md` will always appear at the bottom of the current list.
Weights can also be added to further sort the bottom entries. e.g. `/docs/-01_Coming.md` will appear before `/docs/-02_Soon.md` but both will only appear after all positive or non-weighted files.
It works the same for files prefixed with `+`.
Page order priorities are like this:
- `+` in front of the filename and numbers in front
- `+` in front of the filename
- The index page
- Numbers in the front
- Pages without prefix
- `-` in front of the filename and numbers in front
- `-` in front of the filename
- `+` in front of the filename and numbers in front
- `+` in front of the filename
- The index page
- Numbers in the front
- Pages without prefix
- `-` in front of the filename and numbers in front
- `-` in front of the filename

Datei anzeigen

@ -6,8 +6,8 @@ To enable the generated search, you can set `search` to true in the `html` secti
```json
{
"html": {
"search": true
}
"html": {
"search": true
}
}
```

Datei anzeigen

@ -1,9 +1,8 @@
If you don't want to serve the live version of your site, you can also generate files, these can be one of the three supported formats :
If you don't want to serve the live version of your site, you can also generate files, these can be one of the three supported formats :
- HTML output
- Single page HTML output
- Atlassian Confluence upload
- HTML output
- Single page HTML output
- Atlassian Confluence upload
Generating a complete set of pages, with navigation
@ -13,7 +12,7 @@ daux --destination=[Output Directory Relative Direction]
## Options
For more options, run
For more options, run
```bash
daux generate --help
@ -32,7 +31,7 @@ daux --format=html
### Specify a processor
A processor can be specified through the `--processor` option, this should be the name of a class inside the `Todaymade\Daux\Extension` namespace.
A processor can be specified through the `--processor` option, this should be the name of a class inside the `Todaymade\Daux\Extension` namespace.
By running :

Datei anzeigen

@ -18,10 +18,8 @@ You can enable this feature in your configuration
```json
{
"html": {
"auto_toc": true
}
"html": {
"auto_toc": true
}
}
```