You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigation.indexes is active, I expect MkDocs to create a section index page when a nameless index.md page is placed inside in the nav as described in the Section index pages article, and NOT create it otherwise.
Witnessed behavior
If a file path ends with index.md, this file is elected as a section index regardless of its name.
Interpretation
This issue is due to the fact that my files are named "index". I understand that I could rename them to something else and they won't be interpreted as section indexes.
However, I am doing a perpetually growing doc and each topic that is single file will probably need multiple files in the future, so I want to be able to create a folder with a single index file per topic.
This mechanic might stem from MkDocs directly and might not be related to Material:
When a directory is requested, by default, most web servers will return an index file (usually named index.html) contained within that directory if one exists. For that reason, the homepage in all of the examples above has been named index.md, which MkDocs will render to index.html when building the site.
Many repository hosting sites provide special treatment for README files by displaying the contents of the README file when browsing the contents of a directory. Therefore, MkDocs will allow you to name your index pages as README.md instead of index.md. In that way, when users are browsing your source code, the repository host can display the index page of that directory as it is a README file. However, when MkDocs renders your site, the file will be renamed to index.html so that the server will serve it as a proper index file.
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. MkDocs, writing your docs page
Warning
When doing tests, please create all pages that are reported in your nav. If not, this behavior is unpredicteable.
Compare the rendering of the "ships" and the "trains" folder. Ships doesn't follow the Section index pages and should not have a section index, and "trains" should.
Context
No response
Bug description
Example setting
Here is the nav for the illustrations:
Problem description
Expected behavior
When
navigation.indexesis active, I expect MkDocs to create a section index page when a nameless index.md page is placed inside in thenavas described in the Section index pages article, and NOT create it otherwise.Witnessed behavior
If a file path ends with
index.md, this file is elected as a section index regardless of its name.Interpretation
This issue is due to the fact that my files are named "index". I understand that I could rename them to something else and they won't be interpreted as section indexes.
However, I am doing a perpetually growing doc and each topic that is single file will probably need multiple files in the future, so I want to be able to create a folder with a single index file per topic.
This mechanic might stem from MkDocs directly and might not be related to Material:
Warning
When doing tests, please create all pages that are reported in your nav. If not, this behavior is unpredicteable.
Related links
Reproduction
9.5.36-unwanted-index-behavior.zip
Steps to reproduce
Compare the rendering of the "ships" and the "trains" folder. Ships doesn't follow the Section index pages and should not have a section index, and "trains" should.
Browser
No response
Before submitting