Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.
/ git_marked Public archive

Preview GitHub Flavored Markdown using the Marked app for Mac

Notifications You must be signed in to change notification settings

johnmdonahue/git_marked

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Git Marked

Preview GitHub Flavored Markdown using the Marked app for Mac

Requirements:

If you have Ruby and Rubygems:

gem install redcarpet --version=1.17.2
gem install albino nokogiri
sudo easy_install pygments

Installation

git clone https://github.com/johnmdonahue/git_marked

In Marked preferences:

  1. Behavior > Advanced > Custom Markdown Processor: /Users/[your path]/git_marked/gfm.rb
  2. Style tab: Add the included gfm.css as a "Custom CSS"

Gotchas

  • 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

What This Adds to Marked

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

Screenshot

Screenshot

##Credit

Adapted from alampros/Docter

About

Preview GitHub Flavored Markdown using the Marked app for Mac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages