Add a Sphinx extension for extracting page metadata.

Review Request #12864 — Created March 3, 2023 and updated — Latest diff uploaded

Information

beanbag-docutils
master

Reviewers

Modern versions of docutils and Sphinx allow for setting certain kinds
of page metadata, using .. meta::. This is useful for SEO/social media
page descriptions, for instance.

The problem is, these get compiled directly to a block of <meta> tags,
which isn't what we want in our case, since we render docs more
explicitly and need to use this metadata for multiple things.

This change introduces an extension that walks the document, extracts
the metadata, and stores it in the document's structured metadata
storage, where we can get access to it.

Unit tests passed.

Added some metadata to a page, and verified our website could extract it
and use it.

Also verified the presence in the compiled JSON files.

Commits

Files