Merge pull request #90 from justinwalsh/master
Sync develop with master.
This commit is contained in:
commit
518f1b55a9
15
README.md
15
README.md
@ -31,10 +31,12 @@ Download this repository as a zip, and unpack. Copy the files to a web server th
|
||||
|
||||
## Folders
|
||||
|
||||
The generator will look for folders in the `/docs` folder. Add your folders inside the `/docs` folder. This project contains some example folders and files to get you started.
|
||||
By default, the generator will look for folders in the `/docs` folder. Add your folders inside the `/docs` folder. This project contains some example folders and files to get you started.
|
||||
|
||||
You can nest folders any number of levels to get the exact structure you want. The folder structure will be converted to the nested navigation.
|
||||
|
||||
If you'd prefer to keep your docs somewhere else (like outside of the daux.io root directory) you can specify your docs path in the `config.json` file.
|
||||
|
||||
## Files
|
||||
|
||||
The generator will look for Markdown `*.md` files inside the `/docs` folder and any of the subfolders within /docs.
|
||||
@ -82,6 +84,17 @@ Change the title bar in the docs
|
||||
}
|
||||
```
|
||||
|
||||
###Docs Path:
|
||||
If you'd prefer to keep your docs outside of the Daux.io directory, you can provide the filepath.
|
||||
|
||||
Note: Your `config.json` file will need to remain in `/daux.io/docs`.
|
||||
|
||||
```json
|
||||
{
|
||||
"docs_path": "../../my_docs"
|
||||
}
|
||||
```
|
||||
|
||||
###Themes:
|
||||
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
|
||||
|
||||
|
@ -31,10 +31,12 @@ Download this repository as a zip, and unpack. Copy the files to a web server th
|
||||
|
||||
## Folders
|
||||
|
||||
The generator will look for folders in the `/docs` folder. Add your folders inside the `/docs` folder. This project contains some example folders and files to get you started.
|
||||
By default, the generator will look for folders in the `/docs` folder. Add your folders inside the `/docs` folder. This project contains some example folders and files to get you started.
|
||||
|
||||
You can nest folders any number of levels to get the exact structure you want. The folder structure will be converted to the nested navigation.
|
||||
|
||||
If you'd prefer to keep your docs somewhere else (like outside of the daux.io root directory) you can specify your docs path in the `config.json` file.
|
||||
|
||||
## Files
|
||||
|
||||
The generator will look for Markdown `*.md` files inside the `/docs` folder and any of the subfolders within /docs.
|
||||
@ -82,6 +84,17 @@ Change the title bar in the docs
|
||||
}
|
||||
```
|
||||
|
||||
###Docs Path:
|
||||
If you'd prefer to keep your docs outside of the Daux.io directory, you can provide the filepath.
|
||||
|
||||
Note: Your `config.json` file will need to remain in `/daux.io/docs`.
|
||||
|
||||
```json
|
||||
{
|
||||
"docs_path": "../../my_docs"
|
||||
}
|
||||
```
|
||||
|
||||
###Themes:
|
||||
We have 4 built-in Bootstrap themes. To use one of the themes, just set the `theme` option to one of the following:
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"title": "DAUX.IO",
|
||||
"tagline": "The Easiest Way To Document Your Project",
|
||||
"docs_path": "docs",
|
||||
"image": "img/app.png",
|
||||
"theme": "navy",
|
||||
"date_modified": true,
|
||||
|
@ -66,7 +66,7 @@ software, even if advised of the possibility of such damage.
|
||||
require_once('libs/functions.php');
|
||||
|
||||
$options = get_options();
|
||||
$tree = get_tree("docs", $base_url);
|
||||
$tree = get_tree($options['docs_path'], $base_url);
|
||||
$homepage_url = homepage_url($tree);
|
||||
$docs_url = docs_url($tree);
|
||||
|
||||
|
@ -132,6 +132,10 @@ function load_page($tree) {
|
||||
function find_branch($tree) {
|
||||
$path = url_params();
|
||||
foreach($path as $peice) {
|
||||
|
||||
// Support for cyrillic URLs
|
||||
$peice = urldecode($peice);
|
||||
|
||||
// Check for homepage
|
||||
if (empty($peice)) {
|
||||
$peice = 'index';
|
||||
@ -158,7 +162,7 @@ function url_path() {
|
||||
}
|
||||
|
||||
function url_params() {
|
||||
$url = get_uri();
|
||||
$url = rawurldecode(get_uri());
|
||||
$params = explode('/', trim($url, '/'));
|
||||
return $params;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user