From 207052a62893650de33776797f3cd96a5385dc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Goetz?= Date: Mon, 15 May 2017 22:03:42 +0200 Subject: [PATCH] Clarify configuration options, put two spaces indents everywhere --- README.md | 88 +++++++++++----------- docs/01_Features/Edit_on_GitHub_links.md | 16 ++-- docs/01_Features/Landing_page.md | 12 +-- docs/01_Features/Live_mode.md | 6 +- docs/01_Features/Multilanguage.md | 2 +- docs/01_Features/Search.md | 6 +- docs/01_Features/Table_of_contents.md | 6 +- docs/05_Configuration/Confluence_upload.md | 30 ++++---- docs/05_Configuration/Html_export.md | 49 +++++++----- docs/05_Configuration/_index.md | 26 +++---- docs/10_For_Developers/Creating_a_Theme.md | 32 ++++---- 11 files changed, 141 insertions(+), 132 deletions(-) diff --git a/README.md b/README.md index c847c61..718724c 100755 --- a/README.md +++ b/README.md @@ -137,9 +137,7 @@ We have 4 built-in Bootstrap themes. To use one of the themes, just set the `the ```json { - "html": { - "theme": "daux-green" - } + "html": { "theme": "daux-green" } } ``` @@ -148,7 +146,7 @@ To use a custom theme, just copy over the theme folder as well as the `.thm` fil ```json { - "theme": "new-theme", + "html": { "theme": "new-theme" } } ``` @@ -157,7 +155,7 @@ By default your code blocks will be floated to a column on the right side of you ```json { - "float": false + "html": { "float": false } } ``` @@ -166,7 +164,7 @@ Some users might wish to hide the code blocks & view just the documentation. By ```json { - "toggle_code": true + "html": { "toggle_code": true } } ``` @@ -176,7 +174,7 @@ Add a 'Fork me on GitHub' ribbon. ```json { - "repo": "justinwalsh/daux.io" + "html": { "repo": "justinwalsh/daux.io" } } ``` @@ -185,7 +183,7 @@ Include twitter follow buttons in the sidebar. ```json { - "twitter": ["justin_walsh", "todaymade"] + "html": { "twitter": ["justin_walsh", "todaymade"] } } ``` @@ -194,11 +192,13 @@ Include custom links in the sidebar. ```json { - "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" - } + "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" + } + } } ``` @@ -207,7 +207,7 @@ This will embed the google analytics tracking code. ```json { - "google_analytics": "UA-XXXXXXXXX-XX" + "html": { "google_analytics": "UA-XXXXXXXXX-XX" } } ``` @@ -216,7 +216,7 @@ This will embed the piwik tracking code. ```json { - "piwik_analytics": "my-url-for-piwik.com" + "html": { "piwik_analytics": "my-url-for-piwik.com" } } ``` @@ -224,29 +224,19 @@ You can Also give a specific Piwik ID as well. ```json { - "piwik_analytics_id": "43" + "html": { "piwik_analytics_id": "43" } } ``` -### 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"] - } - } -``` - ### Breadcrumb titles Daux.io provides the option to present page titles as breadcrumb navigation. You can *optionally* specify the separator used for breadcrumbs. ```json { - "breadcrumbs": true, - "breadcrumb_separator" : " > " + "html": { + "breadcrumbs": true, + "breadcrumb_separator" : " > " + } } ``` @@ -255,16 +245,7 @@ By default, daux.io will display the last modified time as reported by the syste ```json { - "date_modified": false -} -``` - -### 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" + "html": { "date_modified": false } } ``` @@ -273,9 +254,28 @@ This feature will instructs the navigation generator to seek the first available ```json { - "html": { - "inherit_index": true - } + "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" } ``` @@ -284,7 +284,7 @@ Enables multi-language support which needs seperate directories for each languag ```json { - "languages": { "en": "English", "de": "German" } + "languages": { "en": "English", "de": "German" } } ``` diff --git a/docs/01_Features/Edit_on_GitHub_links.md b/docs/01_Features/Edit_on_GitHub_links.md index 2fa7491..bdd223b 100644 --- a/docs/01_Features/Edit_on_GitHub_links.md +++ b/docs/01_Features/Edit_on_GitHub_links.md @@ -10,9 +10,9 @@ Daux.io will handle the rest ```json { - "html": { - "edit_on_github": "justinwalsh/daux.io/blob/master/docs" - } + "html": { + "edit_on_github": "justinwalsh/daux.io/blob/master/docs" + } } ``` @@ -25,11 +25,11 @@ As long as you can refer your files by a URL, you can create an edit link for yo ```json { - "html": { - "edit_on": { - "name": "Bitbucket", - "basepath": "https://bitbucket.org/onigoetz/daux.io/src/master/docs" - } + "html": { + "edit_on": { + "name": "Bitbucket", + "basepath": "https://bitbucket.org/onigoetz/daux.io/src/master/docs" } + } } ``` diff --git a/docs/01_Features/Landing_page.md b/docs/01_Features/Landing_page.md index ba37806..ae73dc8 100644 --- a/docs/01_Features/Landing_page.md +++ b/docs/01_Features/Landing_page.md @@ -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 + } } ``` diff --git a/docs/01_Features/Live_mode.md b/docs/01_Features/Live_mode.md index 733d440..e76d6a5 100644 --- a/docs/01_Features/Live_mode.md +++ b/docs/01_Features/Live_mode.md @@ -20,9 +20,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 + } } ``` diff --git a/docs/01_Features/Multilanguage.md b/docs/01_Features/Multilanguage.md index 3568a82..8cde8ff 100644 --- a/docs/01_Features/Multilanguage.md +++ b/docs/01_Features/Multilanguage.md @@ -4,7 +4,7 @@ Add this to your config.json : ```json { - "languages": { "en": "English", "de": "German" } + "languages": { "en": "English", "de": "German" } } ``` diff --git a/docs/01_Features/Search.md b/docs/01_Features/Search.md index 27428af..c264fa1 100644 --- a/docs/01_Features/Search.md +++ b/docs/01_Features/Search.md @@ -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 + } } ``` diff --git a/docs/01_Features/Table_of_contents.md b/docs/01_Features/Table_of_contents.md index 4a80a07..c9c6a8c 100644 --- a/docs/01_Features/Table_of_contents.md +++ b/docs/01_Features/Table_of_contents.md @@ -18,9 +18,9 @@ You can enable this feature in your configuration ```json { - "html": { - "auto_toc": true - } + "html": { + "auto_toc": true + } } ``` diff --git a/docs/05_Configuration/Confluence_upload.md b/docs/05_Configuration/Confluence_upload.md index dd36c16..853bfbe 100644 --- a/docs/05_Configuration/Confluence_upload.md +++ b/docs/05_Configuration/Confluence_upload.md @@ -3,11 +3,11 @@ The connection requires three parameters `base_url`, `user` and `pass`. While `u ```json { - "confluence": { - "base_url": "http://my_confluence_server.com/", - "user" : "my_username", - "pass" : "my_password", - } + "confluence": { + "base_url": "http://my_confluence_server.com/", + "user" : "my_username", + "pass" : "my_password" + } } ``` @@ -20,10 +20,10 @@ You can obtain the `ancestor_id` id by editing the page you want to define as a ```json { - "confluence": { - "space_id": "my_space", - "ancestor_id": 50370632 - } + "confluence": { + "space_id": "my_space", + "ancestor_id": 50370632 + } } ``` @@ -36,7 +36,7 @@ Because confluence can't have two pages with the same name in a space, I recomme ```json { - "confluence": { "prefix": "[DAUX]" } + "confluence": { "prefix": "[DAUX]" } } ``` @@ -45,7 +45,7 @@ To make the upload quicker, we try to determine if a page changed or not, first ```json { - "confluence": { "update_threshold": 1 } + "confluence": { "update_threshold": 1 } } ``` @@ -63,7 +63,7 @@ By default, it will inform you that some pages aren't needed anymore and you can ```json { - "confluence": { "delete": true } + "confluence": { "delete": true } } ``` @@ -79,9 +79,9 @@ You can add a text in a "information" macro on top of the document by setting th ```json { - "confluence": { - "header": "These pages are updated automatically, your changes will be overriden." - } + "confluence": { + "header": "These pages are updated automatically, your changes will be overriden." + } } ``` diff --git a/docs/05_Configuration/Html_export.md b/docs/05_Configuration/Html_export.md index f76db59..8883c9a 100644 --- a/docs/05_Configuration/Html_export.md +++ b/docs/05_Configuration/Html_export.md @@ -8,7 +8,7 @@ We have 4 built-in Bootstrap themes. To use one of the themes, just set the `the ```json { - "html": { "theme": "daux-blue" } + "html": { "theme": "daux-blue" } } ``` @@ -17,7 +17,7 @@ To use a custom theme, just copy over the theme folder into the `themes` directo ```json { - "html": { "theme": "new-theme" } + "html": { "theme": "new-theme" } } ``` @@ -26,7 +26,7 @@ By default your code blocks will be floated to a column on the right side of you ```json { - "html": { "float": false } + "html": { "float": false } } ``` @@ -35,7 +35,7 @@ Some users might wish to hide the code blocks & view just the documentation. By ```json { - "html": { "toggle_code": true } + "html": { "toggle_code": true } } ``` @@ -45,7 +45,7 @@ Add a 'Fork me on GitHub' ribbon. ```json { - "html": { "repo": "justinwalsh/daux.io" } + "html": { "repo": "justinwalsh/daux.io" } } ``` @@ -54,7 +54,7 @@ Include twitter follow buttons in the sidebar. ```json { - "html": { "twitter": ["justin_walsh", "todaymade"] } + "html": { "twitter": ["justin_walsh", "todaymade"] } } ``` @@ -63,13 +63,13 @@ 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" - } + "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" } + } } ``` @@ -78,7 +78,7 @@ This will embed the google analytics tracking code. ```json { - "html": { "google_analytics": "UA-XXXXXXXXX-XX" } + "html": { "google_analytics": "UA-XXXXXXXXX-XX" } } ``` @@ -87,7 +87,7 @@ This will embed the piwik tracking code. ```json { - "html": { "piwik_analytics": "my-url-for-piwik.com" } + "html": { "piwik_analytics": "my-url-for-piwik.com" } } ``` @@ -95,7 +95,7 @@ You can Also give a specific Piwik ID as well. ```json { - "html": { "piwik_analytics_id": "43" } + "html": { "piwik_analytics_id": "43" } } ``` @@ -104,10 +104,10 @@ Daux.io provides the option to present page titles as breadcrumb navigation. You ```json { - "html": { - "breadcrumbs": true, - "breadcrumb_separator" : " > " - } + "html": { + "breadcrumbs": true, + "breadcrumb_separator" : " > " + } } ``` @@ -116,6 +116,15 @@ By default, daux.io will display the last modified time as reported by the syste ```json { - "html": { "date_modified": false } + "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} } ``` diff --git a/docs/05_Configuration/_index.md b/docs/05_Configuration/_index.md index 8b37523..529c82d 100644 --- a/docs/05_Configuration/_index.md +++ b/docs/05_Configuration/_index.md @@ -5,7 +5,7 @@ Change the title bar in the docs ```json { - "title": "Daux.io" + "title": "Daux.io" } ``` @@ -14,7 +14,7 @@ Change the tagline bar in the docs ```json { - "tagline": "The Easiest Way To Document Your Project" + "tagline": "The Easiest Way To Document Your Project" } ``` @@ -23,7 +23,7 @@ Change the documentation's author ```json { - "author": "Stéphane Goetz" + "author": "Stéphane Goetz" } ``` @@ -31,12 +31,12 @@ Change the documentation's author 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"] - } - } +{ + "ignore": { + "files": ["Work_In_Progress.md"], + "folders": ["99_Not_Ready"] + } +} ``` ### Timezone @@ -44,7 +44,7 @@ If your server does not have a default timezone set in php.ini, it may return er ```json { - "timezone": "America/Los_Angeles" + "timezone": "America/Los_Angeles" } ``` @@ -53,7 +53,7 @@ Enables multi-language support which needs separate directories for each languag ```json { - "languages": { "en": "English", "de": "German" } + "languages": {"en": "English", "de": "German"} } ``` @@ -85,7 +85,7 @@ be read by the integrated web server. And you set the other formats (like conflu ```json { - "format": "html" + "format": "html" } ``` @@ -96,6 +96,6 @@ More information on how to create a Processor can be found [here](!For_Developer ```json { - "processor": "MyProcessor" + "processor": "MyProcessor" } ``` diff --git a/docs/10_For_Developers/Creating_a_Theme.md b/docs/10_For_Developers/Creating_a_Theme.md index dada75e..cc13272 100644 --- a/docs/10_For_Developers/Creating_a_Theme.md +++ b/docs/10_For_Developers/Creating_a_Theme.md @@ -8,20 +8,20 @@ Here is an example `config.json` file : ```json { - "favicon": "img/favicon.png", - "css": ["css/theme.min.css"], - "js": [], - "fonts": ["https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"], - "variants": { - "blue": { - "favicon": "img/favicon-blue.png", - "css": ["css/theme-blue.min.css"] - }, - "green": { - "favicon": "img/favicon-green.png", - "css": ["css/theme-green.min.css"] - } + "favicon": "img/favicon.png", + "css": ["css/theme.min.css"], + "js": [], + "fonts": ["https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700&subset=latin,cyrillic-ext,cyrillic"], + "variants": { + "blue": { + "favicon": "img/favicon-blue.png", + "css": ["css/theme-blue.min.css"] + }, + "green": { + "favicon": "img/favicon-green.png", + "css": ["css/theme-green.min.css"] } + } } ``` @@ -63,9 +63,9 @@ Change the `theme` option inside `html` ```json { - "html": { - "theme": "{theme}-{variant}" - } + "html": { + "theme": "{theme}-{variant}" + } } ```