Setting up GitHub Pages site

There are lots of guidences on internet about how to set up GitHub Pages site locally with Jekyll. However, there are also lots of mistakes. Here is my way on Jekyll.


1.Start a "Hello World" project

Following the preference on Official Site

2.Run the project locally.

Install Ruby and DevKit. Chinese Guide

  • Choose an apropriate release on rubyinstaller and install it
  • Download a matching DevKit on the same site and unzip it under the Ruby install path
  • Change derectory into DevKit and run ruby dk.rb init
  • Config "config.yml" by adding Ruby path on the end, eg."- C:\Programs\Ruby23"
  • Install DevKit by running ruby dk.rb install

Install Jekyll and Rouge

Start a local project with Jekyll

3.Apply a template to the project

Download a template on jekyllthemes.
Your can read "README.md" in the template folder. There are also two guid: jekyllcn Chinese Guide, jekyllrb English Guide

4.Modify the template

My templeate is fengzhichu. A important part is Mathjax.
Add the following code on the body of in "post.html"

<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
    jax: ["input/TeX","input/MathML","input/AsciiMath","output/CommonHTML"],
    tex2jax: {inlineMath: [['$','$']], displayMath: [['$$','$$']]}
    });
</script>
<script type="text/javascript"
    src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
posted @ 2017-04-13 13:34  龚焱  阅读(281)  评论(0编辑  收藏  举报