Skip to content

Conversation

@JoeyC-Dev
Copy link
Contributor

@JoeyC-Dev JoeyC-Dev commented Jan 8, 2026

Type of change

  • Bug fix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please describe):

Checklist

  • I have read the CONTRIBUTING document.
  • I have checked to ensure that this Pull Request is not for personal changes.
  • I have performed a self-review of my own code.
  • My changes generate no new warnings.

Related Issue

Resolves: #323
Resolves: #114

Changes

  • Add OG image, tags, published/modified time support (search engine will be able to know when you change the content)
  • Add canonical URL support (avoid the past indexing issue with '/post/slug' or '/post/slug/', even though the issue was being addressed in another way)

How To Test

  • Add a cover to the article and check if og:image and twitter:image are included.
  • Check if article:published_time, article:modified_time (optional), article:tag is in the header.
  • Check if rel="canonical" is in the header.

Screenshots (if applicable)

Tested here: https://www.opengraph.xyz
image

Additional Notes

This is the follow-up PR to: #66

I see two previous PRs for OG image generators, but before considering the generator, a simple basic implementation is okay for use, honestly.

Update: I changed my mind. I want to complete what I haven't finished in #66 once and for all, so I made new commits.

@vercel
Copy link

vercel bot commented Jan 8, 2026

@JoeyC-Dev is attempting to deploy a commit to the zephyirdgmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JoeyC-Dev JoeyC-Dev changed the title feat: add OpenGraph image support feat: add OpenGraph image, tags, published/modified time, canonical URL support Jan 8, 2026
let { title, banner, description, lang, setOGTypeArticle } = Astro.props;
let ogImage: string | undefined = undefined;
Copy link
Contributor Author

@JoeyC-Dev JoeyC-Dev Jan 8, 2026

Choose a reason for hiding this comment

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

Hi lint/complexity/noUselessUndefinedInitialization in GitHub Actions/quality,

Do you know if removing | undefined = undefined does cause an error like below?
image

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.

Use post (cover) image as OpenGraph Image OpenGraph Images

1 participant