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

[PCC-1128] Improve OpenGraph information generation #319

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

a11rew
Copy link
Collaborator

@a11rew a11rew commented Oct 15, 2024

Overview

Updates SEO information generators to build better OG data based on standard metadata values

Screenshots

Screenshot 2024-10-15 at 15 13 49

@a11rew a11rew merged commit 5c40347 into main Oct 17, 2024
10 checks passed
article.metadata?.["Hero Image"],
// Extend as needed
]
.filter((url): url is string => typeof url === "string")
.map((url) => ({ url }));
const description = article.metadata?.description
? String(article.metadata?.description)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't have enough context yet to review the PR. But on a casual glance, I noticed this.
optional chaining again in String(article.metadata?.description) might not necessary. I see this in other places too

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah yeah that's true, I'll pay more attention to these. It'd be good to catch these in linting too, I'll see if I can get a PR out adding an ESLint rule for this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

that would be nice .. 👍

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.

3 participants