diff --git a/Gemfile b/Gemfile index 3075f3e..58002d8 100644 --- a/Gemfile +++ b/Gemfile @@ -5,6 +5,12 @@ gem 'nanoc' gem 'icalendar' # ical files gem 'kramdown' + +# Kramdown math mode gems +gem 'kramdown-math-katex' +# Also needed for autoprefixing +gem 'mini_racer' + gem 'sassc' gem 'typogruby' @@ -26,8 +32,6 @@ group :development do end group :production do - # Faster css autoprefixing - gem 'mini_racer' # Autoprefixing for class gem 'autoprefixer-rails' gem 'htmlcompressor' diff --git a/Gemfile.lock b/Gemfile.lock index 4d3b9e9..483edce 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,8 +62,13 @@ GEM ice_cube (0.16.3) json (2.5.1) json_schema (0.20.9) + katex (0.6.1) + execjs (~> 2.7) kramdown (2.3.0) rexml + kramdown-math-katex (1.0.1) + katex (~> 0.4) + kramdown (~> 2.0) libv8 (8.4.255.0) listen (3.4.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -176,6 +181,7 @@ DEPENDENCIES htmlcompressor icalendar kramdown + kramdown-math-katex mini_racer nanoc nanoc-live diff --git a/Rules b/Rules index 902e038..17b3ea4 100644 --- a/Rules +++ b/Rules @@ -4,6 +4,7 @@ require 'json' require 'icalendar' + # Important!!! # First ignore the node_modules, we do not need any of it on the site directly. ignore '/node_modules/**/*' @@ -103,7 +104,7 @@ end compile '/blog/*/*.md' do filter :erb layout '/blogpost.md' - filter :kramdown + filter :kramdown, {math_engine: :katex} filter :typogruby layout '/blogpost.erb' diff --git a/layouts/blogpost.erb b/layouts/blogpost.erb index 50043cb..0c4253c 100644 --- a/layouts/blogpost.erb +++ b/layouts/blogpost.erb @@ -14,6 +14,9 @@ + + + <% end %>