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: Use PEP abstract/introduction as HTML and OG description #3801

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 28, 2024

Fixes #2919.

Use the PEP abstract for <meta property="og:description"> and <meta name="description">.

If the abstract is not found, use the introduction. If that's not found, use the current default of "Python Enhancement Proposals (PEPs)".

The abstract and intros cover 631 / 652 PEPs, which is good enough.

(The abstract alone covers 594 / 652, which might be enough to remove a few extra lines here?)

Trim the description to 256 characters, and escape things like double quotes.


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

@hugovk hugovk added the infra Core infrastructure for building and rendering PEPs label May 28, 2024
@hugovk hugovk requested a review from AA-Turner as a code owner May 28, 2024 20:09
@hugovk
Copy link
Member Author

hugovk commented Jun 10, 2024

I'll merge this tomorrow, if no reviews or objections.

@hugovk hugovk merged commit f1aac9d into python:main Jun 11, 2024
24 checks passed
@hugovk hugovk deleted the abstract-description branch June 11, 2024 06:23
Copy link
Member

@pradyunsg pradyunsg left a comment

Choose a reason for hiding this comment

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

This is a post-merge review, but this LGTM!

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.

Improve meta name="description" tag for rendered PEPs
2 participants