diff --git a/layout/_partial/plugins/comments/utterances/layout.ejs b/layout/_partial/plugins/comments/utterances/layout.ejs index 73ce981..9152395 100644 --- a/layout/_partial/plugins/comments/utterances/layout.ejs +++ b/layout/_partial/plugins/comments/utterances/layout.ejs @@ -11,6 +11,9 @@ function layoutDiv() { } else if (utterances.theme.light) { utterances.theme = utterances.theme.light; } + if (utterances['issue-number']) { + utterances['issue-term'] = null; + } for (let key of Object.keys(utterances)) { if (utterances[key]) { el += ' ' + key + '="' + utterances[key] + '"'; diff --git a/layout/_partial/plugins/comments/utterances/script.ejs b/layout/_partial/plugins/comments/utterances/script.ejs index bf2e0ec..2d808a8 100644 --- a/layout/_partial/plugins/comments/utterances/script.ejs +++ b/layout/_partial/plugins/comments/utterances/script.ejs @@ -11,7 +11,7 @@ } catch (error) {} var script = document.createElement('script'); script.src = 'https://utteranc.es/client.js'; - const keys = ['repo', 'issue-term', 'theme', 'label', 'crossorigin']; + const keys = ['repo', 'issue-term', 'issue-number', 'theme', 'label', 'crossorigin']; keys.forEach((key, i) => { if (el.attributes[key] && el.attributes[key].value) { script.setAttribute(key, el.attributes[key].value); diff --git a/scripts/tags/link.js b/scripts/tags/link.js index d9f2c6d..5a09ac6 100644 --- a/scripts/tags/link.js +++ b/scripts/tags/link.js @@ -1,7 +1,7 @@ /** * link.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/ * 格式与官方标签插件一致使用空格分隔,中括号内的是可选参数(中括号不需要写出来) - * + * * {% link url title [description] [img:src] %} */ @@ -10,7 +10,7 @@ const { ArgsMap } = require('./utils'); hexo.extend.tag.register('link', function(args) { - args = ArgsMap(args, ['src'], ['url', 'title', 'description']); + args = ArgsMap(args, ['img'], ['url', 'title', 'description']); var el = ''; el += '
'; }); } diff --git a/source/js/main.js b/source/js/main.js index 8fddcc2..fdd7082 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -264,6 +264,7 @@ if (stellar.plugins.swiper) { slidesPerView: 'auto', spaceBetween: 8, centeredSlides: true, + loop: true, pagination: { el: '.swiper-pagination', clickable: true,