From 8693e33d44ffba5d16503ca2dddbb9c78e883a5f Mon Sep 17 00:00:00 2001 From: xaoxuu Date: Fri, 24 Aug 2018 18:13:46 +0800 Subject: [PATCH] support mathjax --- README.md | 8 ++++++++ layout/_partial/footer.ejs | 4 ++++ layout/_partial/mathjax.ejs | 36 ++++++++++++++++++++++++++++++++++++ layout/_partial/scripts.ejs | 1 + 4 files changed, 49 insertions(+) create mode 100755 layout/_partial/mathjax.ejs diff --git a/README.md b/README.md index e53bd82..6025ae5 100755 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - 增加了推荐文章列表,增加博客流量。 - 增加了阅读统计。 - 文末可以显示GitHub仓库卡片。 +- 支持渲染MathJax数学公式。 @@ -305,6 +306,13 @@ repo: xaoxuu/hexo-theme-material-x --- ``` +开启渲染MathJax数学公式 +``` +--- +mathjax: true +--- +``` + ## 主题色和其他样式 diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 967d326..b5fe643 100755 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -16,3 +16,7 @@ + +<% if (page.mathjax){ %> + <%- partial('mathjax') %> +<% } %> diff --git a/layout/_partial/mathjax.ejs b/layout/_partial/mathjax.ejs new file mode 100755 index 0000000..5e1ff93 --- /dev/null +++ b/layout/_partial/mathjax.ejs @@ -0,0 +1,36 @@ + + + + + + diff --git a/layout/_partial/scripts.ejs b/layout/_partial/scripts.ejs index 0cb1353..93cd7fa 100755 --- a/layout/_partial/scripts.ejs +++ b/layout/_partial/scripts.ejs @@ -8,6 +8,7 @@ + <%- js('js/jquery.fitvids.js') %>