WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9bbe1bc

Browse files
committed
Fix setting the parent of a SectionPage
1 parent 0ee7339 commit 9bbe1bc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mkdocs_section_index/plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def on_nav(self, nav: Navigation, config, files) -> Navigation:
3737
assert isinstance(page, SectionPage)
3838
page.is_section = page.is_page = True
3939
page.title = section.title
40+
page.parent = section.parent
4041
# The page leaves the section but takes over children that used to be its peers.
4142
section.children.pop(0)
4243
page.children = section.children

0 commit comments

Comments
 (0)