diff --git a/layout/_partials/comments.njk b/layout/_partials/comments.njk index 0171e0e..cd38ca3 100644 --- a/layout/_partials/comments.njk +++ b/layout/_partials/comments.njk @@ -14,7 +14,7 @@ {{ partial(inject_item.layout, inject_item.locals, inject_item.options) }} {%- endfor %} - {{- next_js('comments-buttons.js', true) }} + {{- next_js('comments-buttons.js', { pjax: true }) }} {%- elif theme.comments.style == 'tabs' %}
diff --git a/layout/_partials/page/schedule.njk b/layout/_partials/page/schedule.njk index f21bc35..9deaec1 100644 --- a/layout/_partials/page/schedule.njk +++ b/layout/_partials/page/schedule.njk @@ -1,3 +1,3 @@
-{{- next_js('schedule.js', true) }}
+{{- next_js('schedule.js', { pjax: true }) }}
diff --git a/scripts/helpers/engine.js b/scripts/helpers/engine.js
index db3f8a6..0c22d7f 100644
--- a/scripts/helpers/engine.js
+++ b/scripts/helpers/engine.js
@@ -17,7 +17,10 @@ hexo.extend.helper.register('next_inject', function(point) {
.join('');
});
-hexo.extend.helper.register('next_js', function(file, pjax = false) {
+hexo.extend.helper.register('next_js', function(file, {
+ pjax = false,
+ module = false
+} = {}) {
const { next_version } = this;
const { internal, custom_cdn_url } = this.theme.vendors;
const links = getVendors({
@@ -29,7 +32,7 @@ hexo.extend.helper.register('next_js', function(file, pjax = false) {
custom : custom_cdn_url
});
const src = links[internal] || links.local;
- return ``;
+ return ``;
});
hexo.extend.helper.register('next_vendors', function(name) {