Support customize open_graph information (#448)

This commit is contained in:
Ljcbaby 2022-02-07 18:03:18 +08:00 committed by GitHub
parent 07bd564401
commit 0b73491db0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View File

@ -72,6 +72,13 @@ creative_commons:
# CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org
language:
# Open graph settings
# See: https://hexo.io/docs/helpers#open-graph
open_graph:
enable: true
# Add pairs each line to customize
options: ''
# ---------------------------------------------------------------
# Menu Settings

View File

@ -1,4 +1,6 @@
{{ open_graph() }}
{%- if theme.open_graph.enable %}
{{ open_graph(theme.open_graph.options) }}
{%- endif %}
{# https://github.com/theme-next/hexo-theme-next/issues/866 #}
{%- set canonical = url | replace(r/index\.html$/, '') %}