0. Install RVM & Ruby
$ sudo apt-get update
$ sudo apt-get install -y curl gnupg build-essential
$ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | sudo bash -s stable
$ sudo usermod -a -G rvm `whoami`
$ rvm install ruby-X.X.X
$ rvm --default use ruby-X.X.X
$ gem install bundler --no-rdoc --no-ri
# If bash cannot find ruby,
$ source /etc/profile
1. Install MathJax
-
Problem: MathJax does not work
-
Solution: add the source in “__include” directory and head of your blog post
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {
autoNumber: "AMS" }},
tex2jax: {
inlineMath: [ ['$', '$'] ],
displayMath: [ ['$$', '$$'] ],
processEscapes: true,
}});
MathJax.Hub.Register.MessageHook("Math Processing Error",function (message) {alert("Math Processing Error: "+message[1]);});
MathJax.Hub.Register.MessageHook("TeX Jax - parse error",function (message) {alert("Math Processing Error: "+message[1]);});
</script>
<script type="text/javascript" async src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
<head>
<!-- should remove space between '{' and '%' -->
{ % include mathjax_support.html % }
</head>
2. Unpublished
Problem: wanna hide specific posts
Solution
- add “published” in yaml header of each post
- you can publish “unpublished” posts using –unpublished option
---
layout : post
title : [title post]
published : false
...
---
bundle exec jekyll serve --unpublished
3. Markdown
cell 1x1 | cell 1x3 | |
cell 2x1 | cell 2x3 | |
cell 3x1 | cell 3x3 |