wpilibsuite / sphinxext-opengraph

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

Add option to use og:description as description #71

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

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

Adds a Boolean option for conf.py called enable_meta_description, which when true, will add the same description to <meta name="description" content="..."> as used for <meta property="og:description" content="...">.

We're looking into using this extension in the CPython docs (for example: official docs, devguide, PEPs), and improving the SEO by adding the meta description would be very helpful.

Re: https://github.com/python/docs-community/issues/65

TheTripleV commented 1 year ago

Sorry, this was merged prematurely. It's been reverted for now.

A few changes required:

  1. Config options should be preceded with ogp. I think ogp_enable_meta_description would be fine.
  2. I'm not a fan of modifying the config (config["ogp_custom_meta_tags"]). I understand that this is a workaround because tags is a dict. We deferred running make_tags on purpose to make it easier to detect conflicting tags.
  3. New config options should be added to the documentation.

I'll leave additional thoughts on the overall concept/design in #65.

hugovk commented 1 year ago
  1. Sounds good.
  2. Yes, that was replaced with another dict in #72.
  3. Good idea.

But let's continue in #65.