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

Fix reversed breadcrumbs in rtd theme #2179

merged 1 commit into from Jul 7, 2021

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 waylan commented Oct 27, 2020

This needs a note added to the release-notes.

@jkozera
Copy link
Contributor Author

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

I confirm that this fixes #2143

@oprypin
Copy link
Member

@oprypin 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
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants