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
We are only checking that the page is an index page at the root of the nav and not looking at the path at all. However, we do not require the nav to match the file structure. We simply need to add a check that the path is at the doc_dir root. Perhaps and '/' not in self.url.
A user could place a nested (in the file structure) index page on the root level of the nav.
That file should not return `True` for `page.is_homepage`. Fixes#1919.
Starting a new site and rolling my own theme. Came across some slightly odd behaviour.
Mkdocs version 1.0.4
Python version 3.7.1
Expected:
page.is_homepage
evaluates to True on the home (index.md) of the site, and false on all other pages.Actual:
page.is_homepage
evaluates to True on the home (index.md), and on any other index.md that is included in the nav object without nesting.Examples:
The unexpected result:
Changing the filename causes it to evaluate to false:
If I tweak it a bit, so that the sections are nested, then it evaluates to false as I'd expect:
This feels like a bug - especially as simply changing the markdown file name causes the behaviour to change.
The text was updated successfully, but these errors were encountered: