Skip to content

Fix reversed breadcrumbs in rtd theme#2179

Merged
oprypin merged 1 commit into
mkdocs:masterfrom
jmymay:patch-1
Jul 7, 2021
Merged

Fix reversed breadcrumbs in rtd theme#2179
oprypin merged 1 commit into
mkdocs:masterfrom
jmymay:patch-1

Conversation

@jmymay

@jmymay jmymay commented Sep 3, 2020

Copy link
Copy Markdown
Contributor

pages.py and nav.py generate the ancestors property in the following way:

[self.parent] + self.parent.ancestors

This causes the parent to be first and the root to be last in the list, which is opposite to the order expected in breadcrumbs. This patch fixes it by reversing them before creating the breadcrumbs html.

Fixes #2143

@waylan

waylan commented Oct 27, 2020

Copy link
Copy Markdown
Contributor

This needs a note added to the release-notes.

@jmymay

jmymay commented Oct 27, 2020

Copy link
Copy Markdown
Contributor Author

@waylan I've just added a note. (Also rebased on top of master, in case that may help.)

@oprypin oprypin left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm that this fixes #2143

@oprypin

This comment was marked as abuse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong breadcrumbs order for nested navigation items

3 participants