Add a Sphinx extension for extracting page metadata.

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

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.

Summary ID
Add a Sphinx extension for extracting page metadata.
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.
89ccdbfc41e3d67e14da6104af5bf6492eb1c6f6
Description From Last Updated

What's the purpose of this assert False?

maubinmaubin
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
maubin
  1. 
      
  2. beanbag_docutils/sphinx/ext/metadata.py (Diff revision 1)
     
     
    Show all issues

    What's the purpose of this assert False?

  3.