Skip to content

Conversation

@aidanfnv
Copy link
Contributor

@aidanfnv aidanfnv commented Aug 18, 2025

Closes #152

This change adds a GitHub action to locally build the Sphinx build used by ReadTheDocs as a check for pull requests, so that we can catch problematic changes before they are merged. After the build completes without errors, a "linkcheck" build is run that checks that all links to external sites are valid links. Links between documents are currently not checked, as there are some in the User Guide and other docs that are not correct and require further changes in the main slang repo.

This change also adds the build_toctree build flag to the Sphinx build, which when specified will uncomment the toctree directives in the files and build them into the standard Sphinx TOC, which we do not build for the actual deployment (due to the O(n^2) build times), so that the build can warn against inaccessible docs. The add_orphan_directive is used to suppress those warnings by adding orphan: true to the frontmatter so that Sphinx will not complain about the doc not existing in a toctree when we leave it uncommented.

All warnings should be treated as errors (except for "myst.header", which is a warning for a cosmetic issue), but that will require making changes to various docs and doc generators in the main slang repo first to eliminate those warnings. Once those are fixed, the -W flag needs to be added to the build, and the suppressed warnings "myst.xref_missing" and "myst.xref_ambiguous" need to be unsuppressed.

@aidanfnv aidanfnv requested a review from jkwak-work August 18, 2025 23:55
Copy link
Contributor

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@aidanfnv aidanfnv merged commit 20b4fda into shader-slang:main Aug 19, 2025
1 check passed
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.

CI: Sphinx virtual build for docs.shader-slang.org

2 participants