Merge commit 'b094b9'

This commit is contained in:
Tom Preston-Werner 2008-12-15 11:58:52 -08:00
commit bcb67ecc23
6 changed files with 30 additions and 7 deletions

View File

@ -79,6 +79,17 @@ The best way to install Jekyll is via RubyGems:
$ sudo gem install mojombo-jekyll -s http://gems.github.com/
Jekyll requires the gems `directory_watcher`, `liquid`, `open4`,
and `maruku` for markdown support. These are automatically
installed by the gem install command.
Maruku comes with optional support for LaTeX to PNG rendering via
"blahtex":http://gva.noekeon.org/blahtexml/ (Version 0.6) which must be in
your $PATH along with `dvips`.
(NOTE: the version of maruku I am using is `remi-maruku` on GitHub as it
does not assume a fixed location for `dvips`.)
h2. Run
$ cd /path/to/proto/site

View File

@ -5,7 +5,7 @@ require 'lib/jekyll'
Hoe.new('jekyll', Jekyll::VERSION) do |p|
p.developer('Tom Preston-Werner', 'tom@mojombo.com')
p.summary = "Jekyll is a simple, blog aware, static site generator."
p.extra_deps = ['RedCloth', 'liquid', 'classifier', 'rdiscount', 'directory_watcher', 'open4']
p.extra_deps = ['RedCloth', 'liquid', 'classifier', 'maruku', 'directory_watcher', 'open4']
end
desc "Open an irb session preloaded with this library"

1
TODO
View File

@ -1,2 +1,3 @@
[ ] Easier configuration of Maruka and blahtex directories [mdreid]
[ ] Accurate "related posts" calculator
[ ] Autobuild

View File

@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<RedCloth>, [">= 0"])
s.add_runtime_dependency(%q<liquid>, [">= 0"])
s.add_runtime_dependency(%q<classifier>, [">= 0"])
s.add_runtime_dependency(%q<rdiscount>, [">= 0"])
s.add_runtime_dependency(%q<maruku>, [">= 0"])
s.add_runtime_dependency(%q<directory_watcher>, [">= 0"])
s.add_runtime_dependency(%q<open4>, [">= 0"])
s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
@ -34,7 +34,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<RedCloth>, [">= 0"])
s.add_dependency(%q<liquid>, [">= 0"])
s.add_dependency(%q<classifier>, [">= 0"])
s.add_dependency(%q<rdiscount>, [">= 0"])
s.add_dependency(%q<maruku>, [">= 0"])
s.add_dependency(%q<directory_watcher>, [">= 0"])
s.add_dependency(%q<open4>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.8.0"])
@ -43,7 +43,7 @@ Gem::Specification.new do |s|
s.add_dependency(%q<RedCloth>, [">= 0"])
s.add_dependency(%q<liquid>, [">= 0"])
s.add_dependency(%q<classifier>, [">= 0"])
s.add_dependency(%q<rdiscount>, [">= 0"])
s.add_dependency(%q<maruku>, [">= 0"])
s.add_dependency(%q<directory_watcher>, [">= 0"])
s.add_dependency(%q<open4>, [">= 0"])
s.add_dependency(%q<hoe>, [">= 1.8.0"])

View File

@ -13,9 +13,20 @@ require 'time'
require 'liquid'
require 'redcloth'
begin
require 'rdiscount'
require 'maruku'
require 'maruku/ext/math'
# Switch off MathML output
MaRuKu::Globals[:html_math_output_mathml] = false
MaRuKu::Globals[:html_math_engine] = 'none'
# Turn on math to PNG support with blahtex
# Resulting PNGs stored in `images/latex`
MaRuKu::Globals[:html_math_output_png] = true
MaRuKu::Globals[:html_png_engine] = 'blahtex'
MaRuKu::Globals[:html_png_dir] = 'images/latex'
MaRuKu::Globals[:html_png_url] = '/images/latex/'
rescue LoadError
puts "The rdiscount gem is required for markdown support!"
puts "The maruku gem is required for markdown support!"
end
# internal requires

View File

@ -30,7 +30,7 @@ module Jekyll
self.content = RedCloth.new(self.content).to_html
when ".markdown":
self.ext = ".html"
self.content = RDiscount.new(self.content).to_html
self.content = Maruku.new(self.content).to_html
end
end