Improve documentation add missing examples, adds to #453

This commit is contained in:
Stéphane Goetz 2017-05-16 22:24:28 +02:00
parent 207052a628
commit 30b6b2c2d4
4 changed files with 157 additions and 257 deletions

173
README.md
View File

@ -141,174 +141,11 @@ We have 4 built-in Bootstrap themes. To use one of the themes, just set the `the
}
```
### Custom Theme
To use a custom theme, just copy over the theme folder as well as the `.thm` file for that theme into the `themes` directory and set its value in the `theme` param in config.json
```json
{
"html": { "theme": "new-theme" }
}
```
### Code Floating
By default your code blocks will be floated to a column on the right side of your content. To disable this feature, set the `float` property to `false`.
```json
{
"html": { "float": false }
}
```
### Toggling Code Blocks
Some users might wish to hide the code blocks & view just the documentation. By setting the `toggle_code` property to `true`, you can offer a toggle button on the page.
```json
{
"html": { "toggle_code": true }
}
```
### GitHub Repo
Add a 'Fork me on GitHub' ribbon.
```json
{
"html": { "repo": "justinwalsh/daux.io" }
}
```
### Twitter
Include twitter follow buttons in the sidebar.
```json
{
"html": { "twitter": ["justin_walsh", "todaymade"] }
}
```
### Links
Include custom links in the sidebar.
```json
{
"html": {
"links": {
"GitHub Repo": "https://github.com/justinwalsh/daux.io",
"Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues",
"Made by Todaymade": "http://todaymade.com"
}
}
}
```
### Google Analytics
This will embed the google analytics tracking code.
```json
{
"html": { "google_analytics": "UA-XXXXXXXXX-XX" }
}
```
### Piwik Analytics
This will embed the piwik tracking code.
```json
{
"html": { "piwik_analytics": "my-url-for-piwik.com" }
}
```
You can Also give a specific Piwik ID as well.
```json
{
"html": { "piwik_analytics_id": "43" }
}
```
### Breadcrumb titles
Daux.io provides the option to present page titles as breadcrumb navigation. You can *optionally* specify the separator used for breadcrumbs.
```json
{
"html": {
"breadcrumbs": true,
"breadcrumb_separator" : " > "
}
}
```
### Date Modified
By default, daux.io will display the last modified time as reported by the system underneath the title for each document. To disable this, change the option in your config.json to false.
```json
{
"html": { "date_modified": false }
}
```
### Inherit Index
This feature will instructs the navigation generator to seek the first available file to use when there is no index in a folder.
```json
{
"html": { "inherit_index": true }
}
```
### Ignore
Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive.
```json
{
"ignore": {
"files": ["Work_In_Progress.md"],
"folders": ["99_Not_Ready"]
}
}
```
### Timezone
If your server does not have a default timezone set in php.ini, it may return errors when it tries to generate the last modified date/time for docs. To fix these errors, specify a timezone in your config file. Valid options are available in the [PHP Manual](http://php.net/manual/en/timezones.php).
```json
{
"timezone": "America/Los_Angeles"
}
```
### Multi-language
Enables multi-language support which needs seperate directories for each language in `docs/` folder.
```json
{
"languages": { "en": "English", "de": "German" }
}
```
Directory structure:
```
├── docs/
│ ├── index.md
│ ├── en
│ │ ├── 00_Getting_Started.md
│ │ ├── 01_Examples
│ │ │ ├── 01_GitHub_Flavored_Markdown.md
│ │ │ ├── 05_Code_Highlighting.md
│ │ ├── 05_More_Examples
│ │ │ ├── Hello_World.md
│ │ │ ├── 05_Code_Highlighting.md
│ ├── de
│ │ ├── 00_Getting_Started.md
│ │ ├── 01_Examples
│ │ │ ├── 01_GitHub_Flavored_Markdown.md
│ │ │ ├── 05_Code_Highlighting.md
│ │ ├── 05_More_Examples
│ │ │ ├── Hello_World.md
│ │ │ ├── 05_Code_Highlighting.md
```
### More options
Many other options are available:
- [Global options](http://daux.io/Configuration/index)
- [HTML Options](http://daux.io/Configuration/Html_export)
- [Confluence options](http://daux.io/Configuration/Confluence_upload)
## Running Remotely

View File

@ -1,3 +1,7 @@
__Table of contents__
[TOC]
## Configuring the connection
The connection requires three parameters `base_url`, `user` and `pass`. While `user` and `pass` don't really need an explanation, for `base_url` you need to set the path to the server without `rest/api`, this will be added automatically.
@ -36,7 +40,7 @@ Because confluence can't have two pages with the same name in a space, I recomme
```json
{
"confluence": { "prefix": "[DAUX]" }
"confluence": { "prefix": "DAUX -" }
}
```

View File

@ -1,79 +1,10 @@
## Themes
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
__Table of contents__
* daux-blue
* daux-green
* daux-navy
* daux-red
[TOC]
```json
{
"html": { "theme": "daux-blue" }
}
```
## Analytics
## Custom Theme
To use a custom theme, just copy over the theme folder into the `themes` directory and set its value in the `theme` param in config.json
```json
{
"html": { "theme": "new-theme" }
}
```
## Code Floating
By default your code blocks will be floated to a column on the right side of your content. To disable this feature, set the `float` property to `false`.
```json
{
"html": { "float": false }
}
```
## Toggling Code Blocks
Some users might wish to hide the code blocks & view just the documentation. By setting the `toggle_code` property to `true`, you can offer a toggle button on the page.
```json
{
"html": { "toggle_code": true }
}
```
## GitHub Repo
Add a 'Fork me on GitHub' ribbon.
```json
{
"html": { "repo": "justinwalsh/daux.io" }
}
```
## Twitter
Include twitter follow buttons in the sidebar.
```json
{
"html": { "twitter": ["justin_walsh", "todaymade"] }
}
```
## Links
Include custom links in the sidebar.
```json
{
"html": {
"links": {
"GitHub Repo": "https://github.com/justinwalsh/daux.io",
"Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues",
"Made by Todaymade": "http://todaymade.com"
}
}
}
```
## Google Analytics
### Google Analytics
This will embed the google analytics tracking code.
```json
@ -82,7 +13,7 @@ This will embed the google analytics tracking code.
}
```
## Piwik Analytics
### Piwik Analytics
This will embed the piwik tracking code.
```json
@ -99,8 +30,26 @@ You can Also give a specific Piwik ID as well.
}
```
## Automatic Table of Contents
You can add a table of contents on each page automatically, read about it [here](../01_Features/Table_of_contents.md)
## Buttons
You can add buttons to the landing page.
```json
{
"html": {
"buttons": {
"My Website": "http://example.com"
}
}
}
```
## Breadcrumb titles
Daux.io provides the option to present page titles as breadcrumb navigation. You can *optionally* specify the separator used for breadcrumbs.
Daux.io provides the option to present page titles as breadcrumb navigation.
You can *optionally* specify the separator used for breadcrumbs.
```json
{
@ -111,8 +60,19 @@ Daux.io provides the option to present page titles as breadcrumb navigation. You
}
```
## Code Floating
By default your code blocks will be floated to a column on the right side of your content.
To disable this feature, set the `float` property to `false`.
```json
{
"html": { "float": false }
}
```
## Date Modified
By default, daux.io will display the last modified time as reported by the system underneath the title for each document. To disable this, change the option in your config.json to false.
By default, daux.io will display the last modified time as reported by the system underneath the title for each document.
To disable this, change the option in your config.json to false.
```json
{
@ -120,11 +80,92 @@ By default, daux.io will display the last modified time as reported by the syste
}
```
### Inherit Index
## GitHub Repo
Add a 'Fork me on GitHub' ribbon.
```json
{
"html": { "repo": "justinwalsh/daux.io" }
}
```
## Inherit Index
This feature will instructs the navigation generator to seek the first available file to use when there is no index in a folder.
```json
{
"html": { "inherit_index": true}
"html": { "inherit_index": true }
}
```
## Jump buttons
You can have previous/next buttons on each page.
They can be disabled by setting `jump_buttons` to `false`.
```json
{
"html": { "jump_buttons": false }
}
```
## Landing page
The automatic landing page can be disabled through the `auto_landing` option, read about it [here](../01_Features/Landing_page.md)
## Links
Include custom links in the sidebar.
```json
{
"html": {
"links": {
"GitHub Repo": "https://github.com/justinwalsh/daux.io",
"Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues",
"Made by Todaymade": "http://todaymade.com"
}
}
}
```
## Search
Daux has an embedded search engine read all about it [here](../01_Features/Search.md)
## Themes
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
* daux-blue
* daux-green
* daux-navy
* daux-red
```json
{
"html": { "theme": "daux-blue" }
}
```
To use a custom theme, just copy over the theme folder into the `themes` directory and set its value in the `theme` param in `config.json`
```json
{
"html": { "theme": "new-theme" }
}
```
## Toggling Code Blocks
Some users might wish to hide the code blocks & view just the documentation.
By setting the `toggle_code` property to `true`, you can offer a toggle button on the page.
```json
{
"html": { "toggle_code": true }
}
```
## Twitter
Include twitter follow buttons in the sidebar.
```json
{
"html": { "twitter": ["justin_walsh", "todaymade"] }
}
```

View File

@ -1,5 +1,9 @@
To customize the look and feel of your documentation, you can create a `config.json` file in the of the `/docs` folder. The `config.json` file is a JSON object that you can use to change some of the basic settings of the documentation.
__Table of contents__
[TOC]
### Title
Change the title bar in the docs
@ -27,6 +31,30 @@ Change the documentation's author
}
```
### Image
An image to show on the landing page. A relative path from the documentation root.
```json
{
"image": "image.png"
}
```
### Format
Change the output format. It is recommended you set only formats that support the live mode as this will also
be read by the integrated web server. And you set the other formats (like confluence) only by command line
```json
{
"format": "html"
}
```
- __html__ with [its options](./Html_export.md)
- __confluence__ with [its options](./Confluence_upload.md)
Available formats are __HTML__ and __Confluence__
### Ignore
Set custom files and entire folders to ignore within your `/docs` folder. For files make sure to include the file extension in the name. For both files and folders, names are case-sensitive.
@ -79,16 +107,6 @@ Directory structure:
│ │ │ ├── 05_Code_Highlighting.md
```
### Format
Change the output format. It is recommended you set only formats that support the live mode as this will also
be read by the integrated web server. And you set the other formats (like confluence) only by command line
```json
{
"format": "html"
}
```
### Processor
You can set the processor in the documentation or as an option to the command line. If you need it when running the server, you should add it to the configuration.