From 0d84de65132bd26a248e7ae0bc45d6d3c9104cca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=91?= <1395348685z@gmail.com> Date: Mon, 31 May 2021 20:11:57 +0800 Subject: [PATCH] Move `comments.js` and `config.js` inject point (#277) --- layout/_layout.njk | 3 +-- layout/_partials/comments.njk | 2 -- layout/_partials/head/head.njk | 1 + layout/_scripts/index.njk | 2 ++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/layout/_layout.njk b/layout/_layout.njk index b1475a2..9dff4c5 100644 --- a/layout/_layout.njk +++ b/layout/_layout.njk @@ -4,9 +4,8 @@ {{ partial('_partials/head/head.njk', {}, {cache: theme.cache.enable}) }} {%- include '_partials/head/head-unique.njk' -%} {% block title %}{% endblock %} - {{- next_js('config.js') }} - {{- next_inject('head') }} {{ partial('_third-party/analytics/index.njk', {}, {cache: theme.cache.enable}) }} + {{- next_inject('head') }} diff --git a/layout/_partials/comments.njk b/layout/_partials/comments.njk index 0d5a494..0171e0e 100644 --- a/layout/_partials/comments.njk +++ b/layout/_partials/comments.njk @@ -33,5 +33,3 @@ {%- endif %} {%- endif %} {%- endif %} - -{{- next_js('comments.js') }} diff --git a/layout/_partials/head/head.njk b/layout/_partials/head/head.njk index 1a4498f..f74a914 100644 --- a/layout/_partials/head/head.njk +++ b/layout/_partials/head/head.njk @@ -54,3 +54,4 @@ {%- endif %} {{ next_data('main', next_config()) }} +{{- next_js('config.js') }} diff --git a/layout/_scripts/index.njk b/layout/_scripts/index.njk index 6aea29c..6a3788b 100644 --- a/layout/_scripts/index.njk +++ b/layout/_scripts/index.njk @@ -1,5 +1,7 @@ {%- include 'vendors.njk' -%} +{{- next_js('comments.js') }} + {{- next_js('utils.js') }} {%- if theme.motion.enable %} {{- next_js('motion.js') }}