Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reversed breadcrumbs in rtd theme #2179

Merged
merged 1 commit into from Jul 7, 2021
Merged

Conversation

jkozera
Copy link
Contributor

@jkozera jkozera 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
Member

waylan commented Oct 27, 2020

This needs a note added to the release-notes.

@jkozera
Copy link
Contributor Author

jkozera commented Oct 27, 2020

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

Copy link
Member

@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
Copy link
Member

oprypin commented Jul 7, 2021

I un-did your latter force push which added release notes.
I intend to merge this soon.
Thanks for the contribution.

@oprypin oprypin changed the title Fix reversed breadcrumbs in rtd theme (#2143) Fix reversed breadcrumbs in rtd theme Jul 7, 2021
@oprypin oprypin merged commit a012d2e into mkdocs:master Jul 7, 2021
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