Allow docs path to be configured in config.json

This helps when integrating daux.io within a larger project using Bower where we want to keep our docs outside of the daux.io directory and want to keep our filepath changes isolated to the config file rather than modifying index.php.
This commit is contained in:
Paul Stanton 2013-08-22 10:01:59 +01:00
parent f540c54482
commit 6b041596fb
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{ {
"title": "DAUX.IO", "title": "DAUX.IO",
"tagline": "The Easiest Way To Document Your Project", "tagline": "The Easiest Way To Document Your Project",
"docs_path": "docs",
"image": "img/app.png", "image": "img/app.png",
"theme": "navy", "theme": "navy",
"date_modified": true, "date_modified": true,

View File

@ -66,7 +66,7 @@ software, even if advised of the possibility of such damage.
require_once('libs/functions.php'); require_once('libs/functions.php');
$options = get_options(); $options = get_options();
$tree = get_tree("docs", $base_url); $tree = get_tree($options['docs_path'], $base_url);
$homepage_url = homepage_url($tree); $homepage_url = homepage_url($tree);
$docs_url = docs_url($tree); $docs_url = docs_url($tree);