Personal website based on Dr Jekyll and Mr Hide running a custom theme.
Install the Node dependencies, then generate representative title cards:
npm install
npm run og:previewPreview images are written to .og-preview/. To test an unusually long title:
node scripts/generate-og-images.mjs \
--title "A deliberately long blog post title" \
--slug custom-previewProduction cards are rendered at 2400ร1260 and committed with the site. New
posts only need their normal title front matter; the image path is derived
from the dated post filename.
After adding or retitling a post, generate and commit its card and the updated manifest:
npm ci
npm run og:generate
git add assets/og/postsThe pull request check rejects stale generated cards. Netlify publishes the committed images directly and does not regenerate them during deploys.
To use custom artwork for a post, add an image override:
image:
path: /assets/images/custom-social-card.png
width: 2400
height: 1260The site-wide fallback card at assets/og-image.png is managed manually and is
never generated during Netlify builds. After replacing it, bump the ?v= query
in _config.yml so social crawlers request the new image.
