wpilibsuite / sphinxext-opengraph

Sphinx extension to generate unique OpenGraph metadata
https://sphinxext-opengraph.readthedocs.io
Other
74 stars 27 forks source link

Add support for meta description #72

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

Fixes https://github.com/wpilibsuite/sphinxext-opengraph/issues/65.

Re: https://github.com/wpilibsuite/sphinxext-opengraph/issues/65#issuecomment-1285497461.

When ogp_enable_meta_description=True, only add a generated <meta name="description" content="..."> tag if the page doesn't already have a manual one.

For example, a manual override may have been added using this RST:

.. meta::
   :description: My manual description

Also fix a bug where it was adding multiple meta descriptions for subpages.

TODO:

TheTripleV commented 1 year ago

Looks good so far. Please see the comments on #65 and #71

hugovk commented 1 year ago

Rebased to resolve conflicts, and renamed option to ogp_enable_meta_description. Still need to address https://github.com/wpilibsuite/sphinxext-opengraph/issues/65#issuecomment-1286542474 and document.

hugovk commented 1 year ago

Updated for https://github.com/wpilibsuite/sphinxext-opengraph/issues/65#issuecomment-1286542474.

Still TODO: add documentation.

hugovk commented 1 year ago

Docs added, ready for review!