Skip to content

Fix reversed breadcrumbs in rtd theme#2179

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

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

Conversation

@jmymay
Copy link
Copy Markdown
Contributor

@jmymay jmymay commented Sep 3, 2020

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
Copy link
Copy Markdown
Contributor

waylan commented Oct 27, 2020

This needs a note added to the release-notes.

@jmymay
Copy link
Copy Markdown
Contributor Author

jmymay commented Oct 27, 2020

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

Copy link
Copy Markdown

@oprypin oprypin left a comment

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