Prototype static sphinx website for the DEPs#112
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.
|
Ref ticket-37099 |
|
@nanorepublica cool idea, but can we integrate this into the djangoproject.com Sphinx build? I am hesitant to add more domains. Having everything in one place sure is nice from a user perspective. |
|
@codingjoe when you say integrate, do you mean the Sphinx build for Django that gets published to the website at docs.djangoproject.com ? I think there are also some typo fixes to make all the DEPs more consistent to ease the generation of the website. I'll pull those out for separate PRs asap. |
|
@nanorepublica Yes, but now that you mention it, it's already on |
|
doing Noted on the number of subdomains... perhaps something the OCWG can look in due course. |
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.