This repository contains the source for https://docs.bettercourses.org, built with Sphinx and the PyData theme.
- Python + Sphinx documentation site
- MyST enabled (
.mdand.rstsources are both supported) - Custom Sphinx extensions in
source/_ext/ - Cloudflare Pages Functions in
functions/for stable redirects
source/: documentation source contentsource/documentation/: main docs tree grouped by topicsource/_static/: CSS, JavaScript, and imagessource/_templates/: custom theme templatessource/_ext/: custom Sphinx extensions (qms_header,llms)functions/l/[id].js: stable link redirect map (/l/:id)functions/bc/[id].js:/bc/:idredirect handlerscripts/: Typesense indexing helpers
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt
- Development autobuild (with live reload):
./development_autobuild.sh
- Development link check:
./development_linkcheck.sh
- Production-style build:
./production_build.sh
- Production external link checks:
./production_linkcheck.sh
- Direct Sphinx targets:
make htmlmake linkcheck
- Put new content under
source/documentation/...in the most relevant section. - Add new pages to the appropriate
index.rsttoctree; otherwise they are easy to orphan. - Reuse templates when creating new docs:
source/documentation/patterns/pattern-template.rstsource/documentation/insights/insight-template.rstsource/documentation/guides/guides-template.rst
- For LLMS summaries:
- RST: add
.. summary:: - Markdown: add
<!--summary: ... -->
- RST: add
- For controlled document metadata blocks, use the
qms_headerdirective pattern shown inREADME.md.
- If you add or change a stable link in
source/stable-links.rst, keepfunctions/l/[id].jsin sync. - Validate redirect targets after updates.
- Do not edit generated build output (
build/) unless explicitly asked. - Avoid changing anything in
source/_ignore/unless the task explicitly requires it. - Keep changes focused and minimal; prefer small, verifiable edits.