Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infra: Add OG metadata to improve previews of shared links #3707

Merged
merged 1 commit into from
Mar 16, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Mar 8, 2024

I think because this is a custom theme, for some reason the sphinxext-opengraph we use for CPython docs and the devguide doesn't work here.

But it's easy enough to add the Open Graph metadata to the template header, omitting the longer <meta name="description" content="..."> that sphinxext-opengraph generates.

OG docs: https://ogp.me/

Demo

On Discord, with a temporary build using <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">, because https://peps.python.org/_static/og-image.png isn't deployed yet.

image

Currently

image

📚 Documentation preview 📚: https://pep-previews--3707.org.readthedocs.build/

@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label Mar 8, 2024
@hugovk hugovk requested a review from AA-Turner as a code owner March 8, 2024 20:30
Copy link
Member

@JacobCoffee JacobCoffee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would be very nice!

@hugovk hugovk merged commit aa17904 into python:main Mar 16, 2024
23 checks passed
@hugovk hugovk deleted the add-og-metadata2 branch March 16, 2024 13:38
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Core infrastructure for building and rendering PEPs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants