From 0a3f3c388a7481de04127a8b4e50caf8ed396f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=C9=AA=E1=B4=8D=C9=AA?= <1119186082@qq.com> Date: Sat, 19 Oct 2019 01:33:58 +0800 Subject: [PATCH] Migrate to Nunjucks [3] (#1226) --- layout/_macro/post.swig | 4 +- layout/_partials/footer.swig | 1 + layout/_third-party/comments/disqus.swig | 19 +++--- layout/_third-party/math/index.swig | 4 +- scripts/events/lib/config.js | 1 + scripts/filters/excerpt.js | 36 ----------- scripts/filters/exturl.js | 47 --------------- scripts/filters/lazyload.js | 23 ------- scripts/filters/locals.js | 20 +++--- scripts/filters/post.js | 77 ++++++++++++++++++++++++ scripts/helpers/engine.js | 3 +- scripts/helpers/next-url.js | 4 -- scripts/renderer.js | 12 ++-- 13 files changed, 108 insertions(+), 143 deletions(-) delete mode 100644 scripts/filters/excerpt.js delete mode 100644 scripts/filters/exturl.js delete mode 100644 scripts/filters/lazyload.js create mode 100644 scripts/filters/post.js diff --git a/layout/_macro/post.swig b/layout/_macro/post.swig index 3045e01b0b..286fb3c3d2 100644 --- a/layout/_macro/post.swig +++ b/layout/_macro/post.swig @@ -220,7 +220,7 @@ {#####################} {%- if theme.related_posts.enable and (theme.related_posts.display_in_home or not is_index) %} - {% include '../_partials/post/post-related.swig' %} + {{ partial('_partials/post/post-related.swig') }} {%- endif %} {%- if not is_index %} @@ -240,7 +240,7 @@ {%- endif %} {%- if theme.creative_commons.license and theme.creative_commons.post %} - {% include '../_partials/post/post-copyright.swig' %} + {{ partial('_partials/post/post-copyright.swig') }} {%- endif %}