Skip to content

feat: generate ogImage dynamically - #1284

Open
therobrob wants to merge 6 commits into
mainfrom
466-update-preview-image
Open

therobrob wants to merge 6 commits into
mainfrom
466-update-preview-image

Conversation

@therobrob

@therobrob therobrob commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

The Canvas-API isn’t suitable for og:image, because the needed js isn’t processed within the rendering of the preview image. The targets (whatsapp, facebook, etc.) expect a ready and reachable picture-url.

But there is an other option to add dynamic information to the preview images: the images.Overlay function from HUGO itself (see https://gohugo.io/functions/images/overlay/). So i’ve added the Logo Overlay and the page-title to the content image in this way.

The font is customizable as well, but HUGO needs a ttf-file, not woff2. So i left this one in the standard-font Go Regular (see https://gohugo.io/functions/images/text/).

Because of build problems (however…) I’ve updated the Hugo version.

@therobrob therobrob linked an issue Oct 25, 2026 that may be closed by this pull request
@netlify

netlify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fipguide ready!

Name Link
🔨 Latest commit 59cc0bf
🔍 Latest deploy log https://app.netlify.com/projects/fipguide/deploys/6addf1aace6f9196307c9e39
😎 Deploy Preview https://deploy-preview-1284--fipguide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@github-actions

Copy link
Copy Markdown

Hi there! 👋

Thank you for your contribution to the FIP Guide! 🚀
We appreciate your effort in making rail staff travel information more accessible. 🚄

Checklist before merging:

  • Added a description to the Pull Request
  • Checked the License of new pictures (non-commercial use without attribution)
  • Modified content in English
  • Modified content in German
  • Modified content in French

@therobrob
therobrob marked this pull request as draft October 25, 2026 11:57
@therobrob
therobrob marked this pull request as ready for review October 25, 2026 12:11
@therobrob therobrob added the technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc. label Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

technical Technical issues, e.g. related to Hugo, HTML, CSS, deployment, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Preview Image

1 participant