feat: add mathjax support

This commit is contained in:
ppoffice 2017-03-11 21:00:04 +08:00
parent fe349d8bd3
commit 7c1b6fa073
3 changed files with 8 additions and 1 deletions

View File

@ -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:

View File

@ -29,4 +29,10 @@
<% if (theme.plugins.justifiedgallery) { %>
<%- js('libs/justified-gallery/jquery.justifiedGallery.min') %>
<% } %>
<% if (theme.plugins.mathjax) { %>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ['\\(','\\)']] } });
</script>
<%- js('https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML') %>
<% } %>
<% } %>

View File

@ -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