diff --git a/_config.yml b/_config.yml index e6f096e..0569c4d 100644 --- a/_config.yml +++ b/_config.yml @@ -565,7 +565,7 @@ comments: # Available values: tabs | buttons style: tabs # Choose a comment system to be displayed by default. - # Available values: disqus | disqusjs | changyan | livere | gitalk + # Available values: disqus | disqusjs | changyan | livere | gitalk | utterances active: # Setting `true` means remembering the comment system selected by the visitor. storage: true @@ -624,6 +624,15 @@ gitalk: # Available values: en | es-ES | fr | ru | zh-CN | zh-TW language: +# Utterances +# For more information: https://utteranc.es +utterances: + enable: false + repo: # Github repository name + # Available values: pathname | url | title | og:title + issue_term: pathname + # Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light + theme: github-light # --------------------------------------------------------------- # Post Widgets & Content Sharing Services diff --git a/layout/_third-party/comments/utterances.njk b/layout/_third-party/comments/utterances.njk new file mode 100644 index 0000000..85625af --- /dev/null +++ b/layout/_third-party/comments/utterances.njk @@ -0,0 +1,14 @@ +{%- if page.comments %} + +{%- endif %} diff --git a/scripts/filters/comment/changyan.js b/scripts/filters/comment/changyan.js index 792ef98..71e4251 100644 --- a/scripts/filters/comment/changyan.js +++ b/scripts/filters/comment/changyan.js @@ -7,8 +7,8 @@ const { iconText } = require('./common'); // Add comment hexo.extend.filter.register('theme_inject', injects => { - const theme = hexo.theme.config; - if (!theme.changyan.enable || !theme.changyan.appid || !theme.changyan.appkey) return; + const config = hexo.theme.config.changyan; + if (!config.enable || !config.appid || !config.appkey) return; injects.comment.raw('changyan', `