Prototype static sphinx website for the DEPs#112
Open
nanorepublica wants to merge 2 commits into
Open
Conversation
Builds a Sphinx-based static site over the DEP source tree: - tools/generate.py parses every DEP (handling RST :Field: lists, the Markdown frontmatter template, and the loose key-value drafts) and emits a flat _generated/dep/<id>.rst source tree plus a deps.json metadata blob. Slug collisions (e.g. two DEPs claiming id 0007) keep the canonical /dep/<id>/ URL for the most-advanced status and append the file stem to the other. - tools/sphinx/_ext/dep_index.py is a custom directive that renders a filter-and-sort table on the landing page using the metadata JSON; filter state is mirrored into the URL hash so combinations are shareable. - The dirhtml builder gives status-independent permalinks at /dep/<id>/, so URLs survive when DEPs move between status folders. - .github/workflows/pages.yml installs deps, runs generate.py, runs sphinx-build, and deploys to GitHub Pages on push to main.
On pull_request runs, build the site and upload _site as a regular workflow artifact (downloadable from the PR's Checks tab). The Pages deploy job is gated to non-PR events so PRs don't attempt to publish. Concurrency group is per-PR so successive pushes cancel earlier runs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had Claude build this one morning. I think it works as a starting point, which I presented as a solution in this Forum thread: https://forum.djangoproject.com/t/moving-files-in-dsf-repos/45034
You can see an example output site here: https://tranquil-pavlova-402378.netlify.app
I'm opening this as I think it's a meaningful output improvement, but I can understand if it's closed as Claude has clearly written this. I have read it and it seems reasonable to me, but I'm open to other solutions.
Long term this could be deprecated and something built into the main project website.