Preview GitHub Flavored Markdown using the Marked app for Mac
If you have Ruby and Rubygems:
gem install redcarpet --version=1.17.2
gem install albino nokogiri
sudo easy_install pygments
git clone https://github.com/johnmdonahue/git_marked
In Marked preferences:
- Behavior > Advanced > Custom Markdown Processor:
/Users/[your path]/git_marked/gfm.rb
- Style tab: Add the included
gfm.css
as a "Custom CSS"
- Marked uses the system install of ruby. If you use a version manager like RVM or rbenv, you will need to make sure that the gems are installed for the System version and not your shell version.
- If you are having trouble with pygments you may need to link it:
ln -s /usr/local/bin/pygmentize /usr/bin
Strikethru: Woot!
Fenced codeblocks with syntax highlighting via pygments
def syntax_highlighter(html)
doc = Nokogiri::HTML(html)
doc.search("//pre[@lang]").each do |pre|
pre.replace Albino.colorize(pre.text.rstrip, pre[:lang])
end
doc.to_s
end
Auto-linking: www.auto-linking.com
Tables:
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
##Credit
Adapted from alampros/Docter