Skip to content

Commit

Permalink
Update logic for og image selection
Browse files Browse the repository at this point in the history
  • Loading branch information
“yndira-flowforge” committed Jun 24, 2024
1 parent e44617a commit 3a4e434
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/_includes/layouts/base.njk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ eleventyComputed:
<!-- Open Graph URL -->
<meta property="og:url" content="{{ page.url | toAbsoluteUrl }}" />
<!-- Open Graph Image -->
{% if image %}
{% if meta and meta.image %}
<meta property="og:image" content="{{ meta.image | toAbsoluteUrl }}" />
<meta name="twitter:image" content="{{ meta.image | toAbsoluteUrl }}" />
{% elif image %}
<meta property="og:image" content="{{ image | toAbsoluteUrl }}" />
<meta name="twitter:image" content="{{ image | toAbsoluteUrl }}" />
{% else %}
Expand Down

0 comments on commit 3a4e434

Please sign in to comment.