Skip to content

Infra: Use PEP abstract/introduction as HTML and OG description - #3801

Merged
hugovk merged 1 commit into
python:mainfrom
hugovk:abstract-description
Jun 11, 2024
Merged

Infra: Use PEP abstract/introduction as HTML and OG description#3801
hugovk merged 1 commit into
python:mainfrom
hugovk:abstract-description

Conversation

@hugovk

@hugovk hugovk commented May 28, 2024

Copy link
Copy Markdown
Member

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

hugovk commented Jun 10, 2024

Copy link
Copy Markdown
Member Author

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

@hugovk
hugovk merged commit f1aac9d into python:main Jun 11, 2024
@hugovk
hugovk deleted the abstract-description branch June 11, 2024 06:23

@pradyunsg pradyunsg left a comment

Copy link
Copy Markdown
Member

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