Skip to content

Commit

Permalink
update README, append mathjax
Browse files Browse the repository at this point in the history
  • Loading branch information
icylogic committed Apr 15, 2015
1 parent 5b64bd2 commit 5388f2a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Carbon is a simple theme using pjax for elegant loading.
![Screenshot](https://github.com/icylogic/site/raw/master/source/themes/screenshots/carbon.png)
![Screenshot](https://dn-icylogic.qbox.me/img/carbon.gif)

Demo [my blog](https://blog.icylogic.net)
[Demo](http://icylogic.github.io/carbon/)

## Setup

Expand Down
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ feed: /atom.xml
repo: https://icylogic.net

duoshuo: false
mathjax: false
mathjax: true

cdn:
normalize: '//dn-staticfile.qbox.me'
carbon: ''
carbon: '/carbon'
duoshuo: '//static.duoshuo.com'
jQuery: '//dn-staticfile.qbox.me'
pjax: '//dn-staticfile.qbox.me'
Expand Down
23 changes: 23 additions & 0 deletions layout/_partial/mathjax.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//mathjax config similar to math.stackexchange
script(type="text/x-mathjax-config").
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true
}
});
script(type="text/x-mathjax-config").
MathJax.Hub.Config({
tex2jax: {
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
script(type="text/x-mathjax-config").
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
script(type="text/javascript", src=theme.cdn.mathjax)

0 comments on commit 5388f2a

Please sign in to comment.