OpenGraph

Provide og:image for social media sharing

  1. Change following in _config.yml:

     url: "YOUR_PUBLIC_URL"
    
  2. 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.

  3. Make docker deployment for production by adding following to Dockerfile:

     ENV JEKYLL_ENV=production
    

    or to docker-compose.yml should also possible instead of modifying the Dockerfile:

     environment:
       - JEKYLL_ENV=production
    

    This ensures that index.html is 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=2 and v=3 and so on for each update.