Skip to content

doc: align the site with the docs-site standard - #18

Open
edkerk wants to merge 10 commits into
mainfrom
doc/align-docs-site-standard
Open

edkerk wants to merge 10 commits into
mainfrom
doc/align-docs-site-standard

Conversation

@edkerk

@edkerk edkerk commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Follows the docs-site standard of CompMetEng/skills#6, which raven-docs follows too.

  • requirements-sphinx.txt is requirements.txt and gen_api_pages_sphinx.py is gen_api_pages.py, the names raven-docs uses.
  • scripts/: copies of docs-site/scripts. Everything that named GECKO is in scripts/project.yml. The API pages list the same functions as before; they now show signatures and render the numpydoc sections (Parameters, Returns) as in raven-docs, and the MkDocs icon: front matter is gone. The guide pages get links from function names to the API reference and to cobrapy.
  • docs/conf.py follows the standard: straight quotes in the API pages, the cobrapy inventory, the link check settings, and sphinx.ext.mathjax for the equations.
  • docs/_static/custom.css and docs/index.md: the shared stylesheet, with the two greens in use. The home page classes are site-*.
  • docs/_static/language-sync.js: the language of the code tabs is remembered. A switch between MATLAB and Python applies to every tab on the page, to the next pages, to new browser tabs and to later visits, and the install tabs follow it. sphinx-design alone linked the tabs of a page and carried the choice to the next page in the same browser tab only, because it keeps it in sessionStorage. Checked in a browser on the built site.
  • Dark mode: docs/_static/gecko-logo-white.png is made from gecko-logo.png by making every pixel white and keeping the alpha channel, the way gecko-icon-white.png was made. Logos and the favicon are in docs/_static only; docs/assets is removed, including the unused gecko-icon-color.png and gecko-icon-white.png.
  • .readthedocs.yaml and .github/workflows/docs-build.yml: the build fails on warnings. The workflow also runs scripts/check_site.py, the name check and a link check. The name check and the link check do not block yet.
  • .github/workflows/update-submodules.yml opens a pull request instead of pushing to main.
  • DESIGN.md is new. README.md has the new file names, and the em dashes and the link to the old raven-docs location are gone. CONTRIBUTING.md, a pull request template and Dependabot are added. Four guide pages that explain a concept or a format are marked as concept pages.

Open: 121 distinct names on the guide pages are neither functions of the toolboxes nor allow-listed (scripts/check_names.py). Most are keyword arguments, struct fields and YAML keys; someone who knows the pages has to sort them before the check can block. Needed outside the repository: "Build pull requests for this project" in the Read the Docs settings, and the GitHub setting that allows Actions to create pull requests.

…older

requirements-sphinx.txt is requirements.txt and gen_api_pages_sphinx.py is gen_api_pages.py, the names used by the other sites. The scripts are copies of docs-site/scripts in CompMetEng/skills; names, paths and categories are in scripts/project.yml. The API pages now show signatures and render numpydoc sections, list the same functions as before, and no longer carry the MkDocs icon front matter. conf.py follows the standard: smartquotes off, the cobrapy inventory and the guide linker, and a link check setting. Logos and the favicon are in docs/_static only, with a white logo for dark mode made from the green one (every pixel white, alpha kept, as for gecko-icon-white.png); docs/assets is removed.
The home page classes are site-* instead of gd-*, and the home page has one logo per colour scheme. The two greens in use (#43684B for tabs and borders, #2D6E3B for links and the badge, with the dark-mode values) are set as --pst-color-primary, --pst-color-link and --site-accent.
docs-build.yml runs scripts/check_site.py, a build with -W, the function name check and a link check on pull requests, on pushes to main and weekly. Read the Docs fails on warnings too. The name check and the link check do not block yet: 124 distinct names on the guide pages are unresolved and the external links were not checked. The submodule update opens a pull request instead of pushing to main; this needs the repository setting that allows GitHub Actions to create pull requests.
…Dependabot

CONTRIBUTING.md has the same writing rules as before plus the build commands and the reference to the docs-site standard. Dependabot updates the pip and GitHub Actions dependencies weekly.
…lugin

The name check keeps deprecated Python aliases, which the reference pages leave out, so the guide pages can name an alias on purpose. The scripts were copied before that change.
DESIGN.md records the purpose, structure, differences from the standard (mathjax), open items and the decisions of this alignment. The README names the new files and scripts, describes the strict build and drops the em dashes and the link to the old raven-docs location. Four guide pages that explain a concept or a format are marked as concept pages, so they need no function table.
@read-the-docs-community

read-the-docs-community Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The dark-mode logo is a decision in the log and no longer an open question.
…bs and visits

sphinx-design links the tabs of a page and carries the choice to the next page, but keeps it in sessionStorage, so a new browser tab or a later visit started in MATLAB again. language-sync.js stores the language in localStorage, applies it to every tab set when a page loads and when the reader switches, and follows a switch made in another open tab. The install tabs, which have no sync key, select the first tab named after the language.
The site check now requires language-sync.js and its entry in conf.py.
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.

1 participant