Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow setting a canonical URL via ogp_canonical_url #134

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

AA-Turner
Copy link

This PR builds on #133, only the final commit is new.

We introduce a new setting, ogp_canonical_url, which defines the canonical or permanent URL for a webpage, similarly to rel="canonical". The motivating example is Python's documentation, where we have multiple different sites (e.g. 3.12, 3.13, 3.14), but we want search engines and other tools to use docs.python.org/3/ as the canonical URL.

I had considered solving this problem another way, by allowing the URL only for images to be changed, but I believe that this solution is conceptually better, and maps more closely to the description of og:url in the Open Graph Protocol specification.

Please let me know your thoughts and feedback!

A

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant