From f6b236994efb1ebcce0e36c2b9c975480d9579bc Mon Sep 17 00:00:00 2001 From: Gautham Warrier Date: Tue, 12 Aug 2014 10:11:38 +0530 Subject: [PATCH] Invert landing page trigger from 'index' to '_index' --- docs/00_Getting_Started.md | 6 +++--- docs/{index.md => _index.md} | 0 libs/daux_page.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename docs/{index.md => _index.md} (100%) diff --git a/docs/00_Getting_Started.md b/docs/00_Getting_Started.md index 72abce3..bfeeed4 100644 --- a/docs/00_Getting_Started.md +++ b/docs/00_Getting_Started.md @@ -68,7 +68,7 @@ To sort your files and folders in a specific way, you can prefix them with a num ## Landing page -If you want to create a beautiful landing page for your project, simply create a `index.md` file in the root of the `/docs` folder. This file will then be used to create a landing page. You can also add a tagline and image to this page using the config file like this: +If you want to create a beautiful landing page for your project, simply create a `_index.md` file in the root of the `/docs` folder. This file will then be used to create a landing page. You can also add a tagline and image to this page using the config file like this: ```json { @@ -82,7 +82,7 @@ Note: The image can be a local or remote image. Use the convention `` ## Section landing page -If you are interested in having a landing page for a subsection of your docs, all you need to do is add an `index.md` file to the folder. For example, `/docs/01_Examples` has a landing page for that section since there exists a `/docs/01_Examples/index.md` file. If you wish to have an index page for a section without a landing page format, use the name `_index.md` +If you are interested in having a landing page for a subsection of your docs, all you need to do is add an `index.md` file to the folder. For example, `/docs/01_Examples` has a landing page for that section since there exists a `/docs/01_Examples/index.md` file. If you wish to have an landing page for a section sans the document format, use the name `_index.md` ## Configuration @@ -259,7 +259,7 @@ Enables multi-language support which needs seperate directories for each languag Directory structure: ``` ├── docs/ -│ ├── index.md +│ ├── _index.md │ ├── en │ │ ├── 00_Getting_Started.md │ │ ├── 01_Examples diff --git a/docs/index.md b/docs/_index.md similarity index 100% rename from docs/index.md rename to docs/_index.md diff --git a/libs/daux_page.php b/libs/daux_page.php index c6d28be..76e85b3 100644 --- a/libs/daux_page.php +++ b/libs/daux_page.php @@ -115,7 +115,7 @@ $this->params = $params; if ($this->title === 'index') { - $this->homepage = ($this->filename === 'index'); + $this->homepage = ($this->filename === '_index'); $minimum_parent_dir_size = ($params['multilanguage']) ? 2 : 1; if (count($file->parents) >= $minimum_parent_dir_size) { $parent = end($file->parents);