Platform Guide
Add automatic OG images to your Jekyll site (including GitHub Pages) by adding a single meta tag to your head template.
url set in your _config.yml (e.g., url: "https://yourdomain.com") Open your _includes/head.html (or whichever template renders your <head>) and add:
<meta property="og:image" content="https://api.myog.social/og?url={{ page.url | absolute_url | uri_escape }}&template=screenshot-right" />{{ page.url | absolute_url | uri_escape }} is a Liquid expression that outputs the full URL of the current page.
Tip: You can choose from different templates (Brand, Screenshot Right, Screenshot Bottom, Screenshot Only) in the MyOG.social dashboard.
If your head template includes {%- seo -%} (most Jekyll sites do, including Minima and GitHub Pages), add the MyOG tag after it. The jekyll-seo-tag plugin only outputs og:image when a page has image: in its frontmatter, so on most pages your MyOG tag will be the only one.
If some pages have image: in frontmatter, you can avoid duplicate og:image tags with a conditional:
{% unless page.image %}
<meta property="og:image" content="https://api.myog.social/og?url={{ page.url | absolute_url | uri_escape }}&template=screenshot-right" />
{% endunless %} This only emits the MyOG tag when jekyll-seo-tag won't produce its own.
Commit and deploy your changes.
Test your integration using our OG Preview tool or share a link on Twitter/LinkedIn to see your new OG image.
jekyll-seo-tag outputs twitter:image only when image: is in frontmatter. To ensure Twitter/X picks up your MyOG image, add these tags alongside the OG one:
<meta name="twitter:image" content="https://api.myog.social/og?url={{ page.url | absolute_url | uri_escape }}&template=screenshot-right" />
<meta name="twitter:card" content="summary_large_image" /> All standard Minima layouts (home, page, post) inherit from default.html, which includes head.html. One tag covers your entire site.
OG image not showing?
Make sure your domain is added to your MyOG.social dashboard and that url is set in _config.yml. Without it, absolute_url may output a relative path. Social platforms also cache OG images, so you may need to use their cache refresh tools.
Using a custom theme (not Minima)?
Check which template renders your <head> and add the meta tag there instead of _includes/head.html.
Not using jekyll-seo-tag?
If your site doesn't use jekyll-seo-tag, just add the meta tag to whatever template renders your <head>. There's no conflict to worry about.
Sign up for free and add beautiful OG images to your Jekyll site.
Already have an account?
1f6ef7d8b2133e1ce001059bd4b960165b3549cf