OpenGraph
Provide og:image for social media sharing
-
Change following in
_config.yml:url: "YOUR_PUBLIC_URL" -
Add custom header to ./_includes/my-head.html, e.g., for open graph social media sharing:
<meta property="og:image" content="https://programm.gruene-wuerzburg.de/assets/img/buendnis_90_die_gruenen_logo.png" /> <meta property="og:title" content="OpenGraph" /> <meta property="og:description" content="Diese Seite informiert über das Kommunalwahlprogramm 2026 der GRÜNEN Würzburg-Stadt " /> <meta property="og:url" content="https://programm.gruene-wuerzburg.de/OPENGRAPH/" />After deployment this image path must be publicly accessible.
-
Make docker deployment for production by adding following to
Dockerfile:ENV JEKYLL_ENV=productionor to
docker-compose.ymlshould also possible instead of modifying theDockerfile:environment: - JEKYLL_ENV=productionThis ensures that
index.htmlis genterated with the correct URLs for assets and links. Otherwise, the site will work locally but not when deployed to production.
Test social media sharing
Build public available version and share your URL, e.g. on WhatsApp.
Caching old images can cause issues. You can add a query parameter to your URL to force social media platforms to fetch the new image, e.g.,
https://yourdomain.com/?v=2andv=3and so on for each update.