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

enhance(opengraph): fix og:image and add og:{image:*,site_name,type} #9795

Merged
merged 5 commits into from
Nov 6, 2023

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Oct 11, 2023

Summary

Fixes #9429.

Problem

The Open Graph meta data had two issues:

  1. The og:locale was not in the right format, with - instead of _ separating language and territory.
  2. The og:image:alt property was missing.

Solution

  1. Fix the og:locale format.
  2. Add og:image:alt as well as og:image:{type,height,width}.

Also adds og:site_name and og:type.


How did you test this change?

Ran yarn && yarn dev and inspected HTML of http://localhost:5042/zh-TW/docs/Learn/HTML.

@caugner caugner requested a review from a team October 11, 2023 10:45
@caugner caugner changed the title Improve opengraph meta data enhance(opengraph): fix og:image and add og:image:* + og:site_name Oct 11, 2023
@caugner caugner changed the title enhance(opengraph): fix og:image and add og:image:* + og:site_name enhance(opengraph): fix og:image and add og:{image:*,site_name,type} Oct 11, 2023
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

lgtm!

@caugner caugner merged commit a9ee3d3 into main Nov 6, 2023
13 checks passed
@caugner caugner deleted the improve-opengraph-meta-data branch November 6, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix and improve Open Graph HTML meta tags
2 participants