Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-36883: Configure sphinx build with technote.toml #4

Merged
merged 5 commits into from
Nov 9, 2022

Conversation

jonathansick
Copy link
Member

This PR implements a base sphinx configuration module, technote.sphinx, and a TechnoteSphinxConfig class that provides helper methods for configuring Sphinx configuration variables using data from the technote.toml-based models.

These sphinx configurations expressed in Pydantic/TOML were originally
developed for our Rubin user guide theme in Documenteer. I'm re-adapting
theme here for Technote. In technote the Sphinx configurations are
simpler because the format is more constrained.

The base Sphinx configuration module will load the [technote.sphinx]
table data and apply these configurations to the Sphinx config.
Technically we're already intending for a single page build, but now
this ensures that happens. It also prevents sphinx from generating
unneeded indices and extra pages.
This establishes the basic system for configuring the sphinx build using
technote.toml. The technote.sphinxconf module provides the base Sphinx
configuration for conf.py. The TechnoteSphinxConfig class contains an
instance of the TechnoteTable model representing the technote.toml file,
and also provides helper methods for setting variables in the
conf.py/technote.sphinxconf context.
The TechnoteJinjaContext provides a class along with the technote.toml
dataset that's accessible from the Jinja context for HTML templates as
the "technote" global variable.
Note we might need to ensure the canonical URL link rel is being emitted
by the template.
@jonathansick jonathansick marked this pull request as ready for review November 9, 2022 23:09
@jonathansick jonathansick merged commit 6a646f9 into main Nov 9, 2022
@jonathansick jonathansick deleted the tickets/DM-36883 branch November 9, 2022 23:15
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