Skip to content

Add option to use og:description as description#71

Merged
Daltz333 merged 1 commit intosphinx-doc:mainfrom
hugovk:enable_meta_description
Oct 18, 2022
Merged

Add option to use og:description as description#71
Daltz333 merged 1 commit intosphinx-doc:mainfrom
hugovk:enable_meta_description

Conversation

@hugovk
Copy link
Copy Markdown
Contributor

@hugovk hugovk commented Oct 18, 2022

For #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: python/docs-community#65

@Daltz333 Daltz333 merged commit 0dc991c into sphinx-doc:main Oct 18, 2022
@hugovk hugovk deleted the enable_meta_description branch October 18, 2022 19:13
TheTripleV added a commit that referenced this pull request Oct 21, 2022
PeterJohnson pushed a commit that referenced this pull request Oct 21, 2022
@TheTripleV
Copy link
Copy Markdown
Collaborator

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.

@TheTripleV TheTripleV mentioned this pull request Oct 21, 2022
3 tasks
@hugovk
Copy link
Copy Markdown
Contributor Author

hugovk commented Oct 21, 2022

  1. Sounds good.
  2. Yes, that was replaced with another dict in Add support for meta description #72.
  3. Good idea.

But let's continue in #65.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants