Skip to content

Commit

Permalink
feat: make extra.social_image config optional
Browse files Browse the repository at this point in the history
  • Loading branch information
st1020 committed Aug 6, 2024
1 parent 0b07957 commit 04a00cb
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@
<meta property="og:site_name" content="{{ config.title }}" />
<meta property="og:description" content="{{ description }}" />
<meta property="og:url" content="{{ page.permalink }}" />
{% set image = page.extra.cover_image | default(value=config.extra.social_image) %}
{% if page.extra.cover_image %}
<!---->
{% set image = page.extra.cover_image %}
<!---->
{% elif config.extra.social_image %}
<!---->
{% set image = config.extra.social_image %}
<!---->
{% endif %}
<!---->
{% if image %}
<meta property="og:image" content="{{ get_url(path=image) }}" />
Expand Down

0 comments on commit 04a00cb

Please sign in to comment.