From f4d0f11335a7da0523a9d2c877b52bbb0b04ef50 Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Mon, 18 Jul 2016 15:13:29 -0400 Subject: [PATCH] Document `pages` config setting default behavior. Fixes #992. Not sure how this was missed. --- docs/user-guide/configuration.md | 4 ++++ docs/user-guide/writing-your-docs.md | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md index 5859ef64..6bc7bf11 100644 --- a/docs/user-guide/configuration.md +++ b/docs/user-guide/configuration.md @@ -162,6 +162,10 @@ See the section on [configuring pages and navigation](/user-guide/writing-your-docs.md#configure-pages-and-navigation) for a more detailed breakdown, including how to create sub-sections. +**default**: By default `pages` will contain an alphanumerically sorted, nested +list of all the Markdown files found within the `docs_dir` and its +sub-directories. If none are found it will be `[]` (an empty list). + ## Build directories ### theme diff --git a/docs/user-guide/writing-your-docs.md b/docs/user-guide/writing-your-docs.md index 2daa9feb..5791f094 100644 --- a/docs/user-guide/writing-your-docs.md +++ b/docs/user-guide/writing-your-docs.md @@ -10,7 +10,10 @@ The [pages configuration](/user-guide/configuration.md#pages) in your `mkdocs.yml` defines which pages are built by MkDocs and how they appear in the documentation navigation. If not provided, the pages configuration will be automatically created by discovering all the Markdown files in the -[documentation directory](/user-guide/configuration.md#docs_dir). +[documentation directory](/user-guide/configuration.md#docs_dir). An +automatically created pages configuration will always be sorted +alphanumerically by file name. You will need to manually define your pages +configuration if you would like your pages sorted differantly. A simple pages configuration looks like this: