-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Summary
MkDocs will generate index.html from README.md in the theme directory, even if index.md exists in the docs directory.
Steps to reproduce
Consider the following minimal example:
├── docs
│ └── index.md
├── mkdocs.yml
└── theme
├── main.html
└── README.md
docs/index.md:
The right index.
theme/README.md:
The wrong index.
theme/main.html:
{{ page.content }}
mkdocs.yml:
site_name: Repro
theme:
name: null
custom_dir: theme
nav:
- Overview: index.mdAfter running mkdocs build, the following index.html is produced:
<p>The wrong index.</p>
Furthermore, mkdocs build emits the following message:
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- README.md
This is especially surprising, because the the docs say:
If both an index.md file and a README.md file are found in the same directory, then the index.md file is used and the README.md file is ignored.
I would expect markdown files in the theme directory to not affect how the documentation is built, unless they are specifically included from a template.
$ mkdocs --version
mkdocs, version 1.0.4 from /usr/lib/python3.7/site-packages/mkdocs (Python 3.7)
Metadata
Metadata
Assignees
Labels
No labels