Skip to content

Commit

Permalink
Fix setting the parent of a SectionPage
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Sep 12, 2023
1 parent 0ee7339 commit 9bbe1bc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mkdocs_section_index/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def on_nav(self, nav: Navigation, config, files) -> Navigation:
assert isinstance(page, SectionPage)
page.is_section = page.is_page = True
page.title = section.title
page.parent = section.parent
# The page leaves the section but takes over children that used to be its peers.
section.children.pop(0)
page.children = section.children
Expand Down

0 comments on commit 9bbe1bc

Please sign in to comment.