Skip to content

Commit 04a00cb

Browse files
committed
feat: make extra.social_image config optional
1 parent 0b07957 commit 04a00cb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

templates/partials/head.html

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,15 @@
3636
<meta property="og:site_name" content="{{ config.title }}" />
3737
<meta property="og:description" content="{{ description }}" />
3838
<meta property="og:url" content="{{ page.permalink }}" />
39-
{% set image = page.extra.cover_image | default(value=config.extra.social_image) %}
39+
{% if page.extra.cover_image %}
40+
<!---->
41+
{% set image = page.extra.cover_image %}
42+
<!---->
43+
{% elif config.extra.social_image %}
44+
<!---->
45+
{% set image = config.extra.social_image %}
46+
<!---->
47+
{% endif %}
4048
<!---->
4149
{% if image %}
4250
<meta property="og:image" content="{{ get_url(path=image) }}" />

0 commit comments

Comments
 (0)