diff --git a/_config.yml b/_config.yml index 2737c7a..11e0198 100644 --- a/_config.yml +++ b/_config.yml @@ -36,6 +36,9 @@ nav_text: # 文章页是否显示目录 toc: true +# 文章中的图片是否支持点击放大 +image_viewer: true + # https://github.com/willin/hexo-wordcount # 是否开启字数统计(关闭请设置enable为false) # 也可以单独在md文件里Front-matter设置`no_word_count: true`属性,来自定义关闭字数统计 diff --git a/layout/_partial/after-footer.ejs b/layout/_partial/after-footer.ejs index 0d3dec2..90fc783 100644 --- a/layout/_partial/after-footer.ejs +++ b/layout/_partial/after-footer.ejs @@ -3,28 +3,28 @@ <%- js('/js/lazyload.min') %> <%- js('/js/busuanzi-2.3.pure.min') %> <% if (theme.fancybox){ %> - <%- js('fancybox/jquery.fancybox.min') %> +<%- js('fancybox/jquery.fancybox.min') %> <% } %> <% if (theme.toc && is_post()){ %> - <%- js('/js/tocbot.min') %> - +<%- js('/js/tocbot.min') %> + <% } %> -<% if (theme.mathjax){ %> - <%- partial('mathjax') %> +<% if (theme.image_viewer){ %> +<%- partial('viewer') %> <% } %> - - - +<% if (theme.mathjax){ %> +<%- partial('mathjax') %> +<% } %> + + \ No newline at end of file diff --git a/layout/_partial/viewer.ejs b/layout/_partial/viewer.ejs new file mode 100644 index 0000000..745b61d --- /dev/null +++ b/layout/_partial/viewer.ejs @@ -0,0 +1,106 @@ + + + + + + + + + \ No newline at end of file