From 76096640f4096c2ba783421a73815e4e4103b0eb Mon Sep 17 00:00:00 2001 From: Kiprey Date: Wed, 14 Apr 2021 09:38:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20mermaid=20=E6=94=AF?= =?UTF-8?q?=E6=8C=81=EF=BC=8C=E6=8F=90=E9=AB=98gitalk=E7=89=88=E6=9C=AC?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=20busuanzi=E5=BC=95=E7=94=A8span?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.yml | 7 +++++++ layout/_partial/after-footer.ejs | 9 +++++++++ layout/_partial/post/busuanzi.ejs | 2 +- layout/_partial/post/gitalk.ejs | 4 ++-- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index c7b1598..d577529 100644 --- a/_config.yml +++ b/_config.yml @@ -157,6 +157,13 @@ katex: allpost: true copy_tex: false +# mermaid 三个选项缺一不可 +mermaid: + enable: true + version: 8.5.2 + cdn: https://cdn.bootcdn.net/ajax/libs/mermaid + theme: forest + # 网站成立年份(默认为 2019,若填入年份小于当前年份,则显示为 2018-2019 类似的格式) since: 2015 diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index ea1a958..bce1e30 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -63,4 +63,13 @@ <% if (theme.canvas_bg == 1) { %> <%- js('/js/dz') %> +<% } %> + +<% if (theme.mermaid.enable) { %> + + <% } %> \ No newline at end of file diff --git a/layout/_partial/post/busuanzi.ejs b/layout/_partial/post/busuanzi.ejs index 3d60835..456fdce 100644 --- a/layout/_partial/post/busuanzi.ejs +++ b/layout/_partial/post/busuanzi.ejs @@ -1,5 +1,5 @@ - <%- __('site_visitors') %>: + <%- __('site_visitors') %>: | <%- __('page_views') %>: \ No newline at end of file diff --git a/layout/_partial/post/gitalk.ejs b/layout/_partial/post/gitalk.ejs index 873cb13..9c19c5c 100644 --- a/layout/_partial/post/gitalk.ejs +++ b/layout/_partial/post/gitalk.ejs @@ -1,7 +1,7 @@ <% if (theme.gitalk.enable && post.comments) { %>
-<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.css') %> -<%- js('https://cdn.jsdelivr.net/npm/gitalk@1.6.2/dist/gitalk.min.js') %> +<%- css('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css') %> +<%- js('https://cdn.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js') %> <%- js('https://cdn.jsdelivr.net/npm/blueimp-md5@2.10.0/js/md5.min.js') %>