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(nx-dev): OG image meta tag #27195

Merged
merged 2 commits into from
Jul 31, 2024
Merged

fix(nx-dev): OG image meta tag #27195

merged 2 commits into from
Jul 31, 2024

Conversation

ndcunningham
Copy link
Contributor

@ndcunningham ndcunningham commented Jul 29, 2024

This PR defaults the OG image if one of the correct file types is not provided.

@ndcunningham ndcunningham requested a review from a team as a code owner July 29, 2024 20:24
@ndcunningham ndcunningham requested a review from jaysoo July 29, 2024 20:24
Copy link

vercel bot commented Jul 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Jul 30, 2024 2:33pm

image: imagePath.replace(ext, foundExt),
type: foundExt.replace('.', ''),
};
}
Copy link
Member

Choose a reason for hiding this comment

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

nit: for code readability I prefer an else here to see the two options

const { ext } = parse(imagePath);

if (!allowedExtensions.includes(ext)) {
const foundExt = allowedExtensions.find((allowedExt) => {
Copy link
Member

Choose a reason for hiding this comment

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

I'd love if this at some point would automatically run a conversion. But this def works for now

@ndcunningham ndcunningham merged commit edf0651 into master Jul 31, 2024
6 checks passed
@ndcunningham ndcunningham deleted the fix/og-image-ai-blog branch July 31, 2024 13:48
FrozenPandaz pushed a commit that referenced this pull request Aug 1, 2024
Copy link

github-actions bot commented Aug 6, 2024

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants