diff --git a/README.md b/README.md index 775ba7a..00457e2 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ theme: new-vno ## Configuration 主题设置 -设置文件:_config.yml +设置主题的配置文件:_config.yml ```yml #menu子菜单,可自定义 @@ -106,4 +106,19 @@ date: 2016-03-03 10:46:46 tags: 分类 --- ``` -![百度统计](source/images/show/article.jpeg) \ No newline at end of file +![百度统计](source/images/show/article.jpeg) + +### 数学公式支持 + +# mathjax +mathjax: true +由于资源考虑,默认是不加载mathjax的,若需使用请在文章头部添加: +```yml +如下示例: +--- +title: 侧耳倾听我的心 +date: 2017-02-18 22:55:08 +tags: 观观影 +mathjax: true +--- +``` \ No newline at end of file diff --git a/_config.yml b/_config.yml index 8a3f494..2a31b85 100644 --- a/_config.yml +++ b/_config.yml @@ -13,7 +13,7 @@ social: twitter: https://twitter.com/onlymonniya google_plus: -page_comment: false +page_comment: true logo: /images/avatar.jpg background: cover: /images/background-cover.jpg @@ -28,3 +28,5 @@ google_analytics: UA-78918255-1 baidu_tongji: 9cdad07c755fa23f6aced510c6760e87 favicon: /images/avatar-small.png +#mathjax +mathjax: true \ No newline at end of file diff --git a/layout/_partial/footer.ejs b/layout/_partial/footer.ejs index 12522c7..b956b66 100644 --- a/layout/_partial/footer.ejs +++ b/layout/_partial/footer.ejs @@ -9,4 +9,8 @@ © <%- date(Date.now(), 'YYYY') %> - 本站使用 new-vno 主题, 由@Monniya 修改自 Vno, 原创出自onevcat - \ No newline at end of file + <% if (page.mathjax){ %> + <%- partial('_partial/mathjax') %> + <% } %> + + diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 2282a10..7585fd3 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -56,6 +56,5 @@ <% if (theme.social["google_plus"]) { %> - <% } %> - + <% } %> diff --git a/layout/_partial/mathjax.ejs b/layout/_partial/mathjax.ejs new file mode 100644 index 0000000..3cc9a10 --- /dev/null +++ b/layout/_partial/mathjax.ejs @@ -0,0 +1,18 @@ + + + \ No newline at end of file diff --git a/layout/_partial/side-panel.ejs b/layout/_partial/side-panel.ejs index 12811ef..aa6300c 100644 --- a/layout/_partial/side-panel.ejs +++ b/layout/_partial/side-panel.ejs @@ -34,5 +34,5 @@
- + \ No newline at end of file diff --git a/layout/index.ejs b/layout/index.ejs index 2b24404..6eb0667 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -36,6 +36,6 @@ <% } %> <% } %> - +<%- partial('_partial/mathjax') %> diff --git a/layout/layout.ejs b/layout/layout.ejs index ef834f5..f09a040 100644 --- a/layout/layout.ejs +++ b/layout/layout.ejs @@ -17,13 +17,10 @@ - - <%- partial('_partial/google_analytics') %> <%- partial('_partial/baidu_tongji') %> - -