-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Fix OG page images #12234
Fix OG page images #12234
Conversation
fixes metadata description not rendering appropriately
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
description={t("common:page-dapps-desc")} | ||
image={ogImage.src} | ||
description={t("page-dapps-desc")} | ||
image="/doge-computer.png" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but figured it was a better approach to use the PageMetadata props for individual pages, and reserve the imageForSlug
for whole markdown sections where we want to match part of the slug like /community/*
... we don't have any nested /dapps/*
pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wackerow Thanks. I think one asset can be safely removed. I also left some other minor comments
Awesome, thanks @nhsz! Will push a patch shortly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
refactor: extract
getOgImage
util@/lib/utils/metadata.ts
, including refactor of the default OG images into a data listimageForSlug
for easy updatingfeat: add/update page OG images
.src
to pass public path string directlyimage
prop toPageMetadata
for pages that have hero images available to be used as OG imagefix: metadata string namespaces