Skip to content

Commit f4969a4

Browse files
authored
Fix error for null theme.open_graph.options (theme-next#470)
1 parent 0533489 commit f4969a4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

_config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ creative_commons:
7777
open_graph:
7878
enable: true
7979
options:
80-
type: website
8180
#twitter_card: <twitter:card>
8281
#twitter_id: <twitter:creator>
8382
#twitter_site: <twitter:site>

layout/_partials/head/head-unique.njk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{%- if theme.open_graph.enable %}
2-
{{ open_graph(theme.open_graph.options) }}
2+
{%- if theme.open_graph.options %}
3+
{{ open_graph(theme.open_graph.options) }}
4+
{%- else %}
5+
{{ open_graph() }}
6+
{%- endif %}
37
{%- endif %}
48

59
{# https://github.com/theme-next/hexo-theme-next/issues/866 #}

0 commit comments

Comments
 (0)