Jekyll Kramdown

Posted on  by 



Octopress is a wonderful blogging framework for hackers, but it does not supportmath typesetting by default. What hacker doesn’t use Latex math?

  • Frustration with Spike.js.
  • Html5 Boilerplate based templates. Kramdown markdown parser and Pygments highlighter.

The followings are configs to make you write latex math equations in Octopress.Then you can translate this

into this

Voilà!

Updated github-pages, jekyll and jekyll-feed gems by running gem install github-pages, gem install jekyll and gem install jekyll-feed. I had to do this step as a simple bunle update wasn't installing the latest version. Modify those gems in the Gemfile to the latest version. Run bundle update; Finally run bundle exec jekyll serve.

Here are the instructions:

  1. Use kramdown instead of rdiscount

kramdown is a free GPL-licensed Ruby library for parsing and converting asuperset of Markdown. It is completely written in Ruby, supports standardMarkdown and latex math equations.

  1. Change settings in _config.yml

Jekyll Kramdown Youtube

Jekyll Kramdown

_config.yml is configurations for Jekyll’s settings. find markdown andchange rdiscount to kramdown

  1. Change gem 'ridiscount' to gem 'kramdown in Gemfile1.

  2. Put MathJax CDN and configs insource/_layouts/default.html.

  1. Fix MathJax right-click bug

Jekyll Kramdown-parser-gfm

I found the solution on luikore’s blog. The problem was when you right-click on a MathJax formula, the whole browser becomes white. To fix it, open sass/base/_theme.scss and change the div under body from

to

Jekyll Kramdown Full

and it is done.

  1. It’s useful if you want to depoloy your code on differnt machines.↩





Coments are closed