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

Fix OG page images #12234

Merged
merged 5 commits into from
Feb 22, 2024
Merged

Fix OG page images #12234

merged 5 commits into from
Feb 22, 2024

Conversation

wackerow
Copy link
Member

Description

refactor: extract getOgImage util

  • Added to @/lib/utils/metadata.ts, including refactor of the default OG images into a data list imageForSlug for easy updating

feat: add/update page OG images

  • Fixes pages passing an imported Image component to PageMetadata using .src to pass public path string directly
  • Adds image prop to PageMetadata for pages that have hero images available to be used as OG image

fix: metadata string namespaces

  • Few namespace issues spotted that were causing some metadata strings to not render corretly

@wackerow wackerow added the medium priority This has a medium priority label Feb 19, 2024
@github-actions github-actions bot added content 🖋️ This involves copy additions or edits review needed 👀 tooling 🔧 Changes related to tooling of the project labels Feb 19, 2024
Copy link

netlify bot commented Feb 19, 2024

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 25ab899
🔍 Latest deploy log https://app.netlify.com/sites/ethereumorg/deploys/65d787be435dcf0008af2375
😎 Deploy Preview https://deploy-preview-12234--ethereumorg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/pages/community.tsx Outdated Show resolved Hide resolved
description={t("common:page-dapps-desc")}
image={ogImage.src}
description={t("page-dapps-desc")}
image="/doge-computer.png"
Copy link
Member Author

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

Copy link
Member

@nhsz nhsz left a 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

@wackerow
Copy link
Member Author

Awesome, thanks @nhsz! Will push a patch shortly

@nhsz nhsz self-requested a review February 21, 2024 13:45
@corwintines corwintines self-assigned this Feb 21, 2024
Copy link
Member

@nhsz nhsz left a comment

Choose a reason for hiding this comment

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

LGTM

@nhsz nhsz merged commit e67d2e5 into dev Feb 22, 2024
6 of 7 checks passed
@nhsz nhsz deleted the og-images branch February 22, 2024 19:27
This was referenced Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content 🖋️ This involves copy additions or edits medium priority This has a medium priority tooling 🔧 Changes related to tooling of the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants