From 7c1b6fa0736a7791e7995f5e9e3e8744729d526e Mon Sep 17 00:00:00 2001 From: ppoffice Date: Sat, 11 Mar 2017 21:00:04 +0800 Subject: [PATCH] feat: add mathjax support --- _config.yml.example | 1 + layout/plugin/scripts.ejs | 6 ++++++ source/css/style.styl | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/_config.yml.example b/_config.yml.example index add9135..543ab45 100644 --- a/_config.yml.example +++ b/_config.yml.example @@ -66,6 +66,7 @@ plugins: google_analytics: # enter the tracking ID for your Google Analytics google_site_verification: # enter Google site verification code baidu_analytics: # enter Baidu Analytics hash key + mathjax: false # options: true, false # Miscellaneous miscellaneous: diff --git a/layout/plugin/scripts.ejs b/layout/plugin/scripts.ejs index 065702c..332eca1 100644 --- a/layout/plugin/scripts.ejs +++ b/layout/plugin/scripts.ejs @@ -29,4 +29,10 @@ <% if (theme.plugins.justifiedgallery) { %> <%- js('libs/justified-gallery/jquery.justifiedGallery.min') %> <% } %> + <% if (theme.plugins.mathjax) { %> + + <%- js('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML') %> + <% } %> <% } %> diff --git a/source/css/style.styl b/source/css/style.styl index 2c5810d..e8933aa 100644 --- a/source/css/style.styl +++ b/source/css/style.styl @@ -31,7 +31,7 @@ code margin: 0 2px color: #e96900 padding: 3px 5px - font-size: 0.8em + font-size: 0.9em border-radius: 2px font-family: font-mono background-color: #f8f8f8