Skip to content

Skip adding orphan directive when page is root#193

Open
aidanfnv wants to merge 1 commit into
shader-slang:mainfrom
aidanfnv:fix/orphan-directive-visible
Open

Skip adding orphan directive when page is root#193
aidanfnv wants to merge 1 commit into
shader-slang:mainfrom
aidanfnv:fix/orphan-directive-visible

Conversation

@aidanfnv
Copy link
Copy Markdown
Contributor

@aidanfnv aidanfnv commented May 11, 2026

Fixes #192

This change causes the add_orphan_directive hook to immediately return if the doc is the root doc.
This will avoid adding the orphan directive to the .rst index file, which will prevent this directive from appearing on the page. This is typically not an issue because the rest of the pages are .md files. It does not make sense for a root doc to be orphaned, as an orphan refers to a non-root TOC tree node that is not attached to the tree.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orphan directive appearing in TOC page title.

1 participant