yangsu.github.io - Read on →









Search Preview

Using Octopress with Github Flavored Markdown (RedCarpet) - Aspiring Entrepreneur

yangsu.github.io
One of the most annoying features of Markdown for me is the fact that newlines within a paragraph are automatically joined, which is one of the …
.io > yangsu.github.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title Using Octopress with Github Flavored Markdown (RedCarpet) - Aspiring Entrepreneur
Text / HTML ratio 28 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud end Markdown RedCarpet lang Github def Octopress = markdown extensions require => GFM Jekyll instructions tables superscript Flavored class hard
Keywords consistency
Keyword Content Title Description Headings
end 10
Markdown 8
RedCarpet 8
lang 6
Github 6
def 6
Headings
H1 H2 H3 H4 H5 H6
3 0 0 0 0 0
Images We found 0 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
end 10 0.50 %
Markdown 8 0.40 %
RedCarpet 8 0.40 %
lang 6 0.30 %
Github 6 0.30 %
def 6 0.30 %
Octopress 6 0.30 %
= 6 0.30 %
markdown 5 0.25 %
extensions 5 0.25 %
require 4 0.20 %
=> 4 0.20 %
GFM 3 0.15 %
Jekyll 3 0.15 %
instructions 3 0.15 %
tables 3 0.15 %
superscript 3 0.15 %
Flavored 3 0.15 %
class 2 0.10 %
hard 2 0.10 %

SEO Keywords (Two Word)

Keyword Occurrence Density
end end 4 0.20 %
end def 4 0.20 %
Github Flavored 3 0.15 %
Flavored Markdown 3 0.15 %
with the 2 0.10 %
I was 2 0.10 %
to render 2 0.10 %
looking for 2 0.10 %
instructions on 2 0.10 %
this post 2 0.10 %
across this 2 0.10 %
~~strikethrough text~~ 2 0.10 %
came across 2 0.10 %
of the 2 0.10 %
normaltext superscript 2 0.10 %
in the 2 0.10 %
should be 2 0.10 %
how to 2 0.10 %
2 3 2 0.10 %
Blog Archives 2 0.10 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
Github Flavored Markdown 3 0.15 % No
across this post 2 0.10 % No
came across this 2 0.10 % No
1 2 3 2 0.10 % No
Aspiring Entrepreneur Blog 1 0.05 % No
path = FilejoinPYGMENTS_CACHE_DIR 1 0.05 % No
text path = 1 0.05 % No
lang text path 1 0.05 % No
= lang text 1 0.05 % No
lang = lang 1 0.05 % No
lang lang = 1 0.05 % No
block_codecode lang lang 1 0.05 % No
def block_codecode lang 1 0.05 % No
RedcarpetRenderHTML def block_codecode 1 0.05 % No
< RedcarpetRenderHTML def 1 0.05 % No
Redcarpet2Markdown < RedcarpetRenderHTML 1 0.05 % No
FilejoinPYGMENTS_CACHE_DIR langDigestMD5hexdigest codehtml 1 0.05 % No
class Redcarpet2Markdown < 1 0.05 % No
FileUtilsmkdir_pPYGMENTS_CACHE_DIR class Redcarpet2Markdown 1 0.05 % No
__FILE__ FileUtilsmkdir_pPYGMENTS_CACHE_DIR class 1 0.05 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
came across this post 2 0.10 % No
Aspiring Entrepreneur Blog Archives 1 0.05 % No
FileUtilsmkdir_pPYGMENTS_CACHE_DIR class Redcarpet2Markdown < 1 0.05 % No
text path = FilejoinPYGMENTS_CACHE_DIR 1 0.05 % No
lang text path = 1 0.05 % No
= lang text path 1 0.05 % No
lang = lang text 1 0.05 % No
lang lang = lang 1 0.05 % No
block_codecode lang lang = 1 0.05 % No
def block_codecode lang lang 1 0.05 % No
RedcarpetRenderHTML def block_codecode lang 1 0.05 % No
< RedcarpetRenderHTML def block_codecode 1 0.05 % No
Redcarpet2Markdown < RedcarpetRenderHTML def 1 0.05 % No
class Redcarpet2Markdown < RedcarpetRenderHTML 1 0.05 % No
__FILE__ FileUtilsmkdir_pPYGMENTS_CACHE_DIR class Redcarpet2Markdown 1 0.05 % No
= FilejoinPYGMENTS_CACHE_DIR langDigestMD5hexdigest codehtml 1 0.05 % No
Fileexpand_path'_cache' __FILE__ FileUtilsmkdir_pPYGMENTS_CACHE_DIR class 1 0.05 % No
= Fileexpand_path'_cache' __FILE__ FileUtilsmkdir_pPYGMENTS_CACHE_DIR 1 0.05 % No
PYGMENTS_CACHE_DIR = Fileexpand_path'_cache' __FILE__ 1 0.05 % No
'albino' PYGMENTS_CACHE_DIR = Fileexpand_path'_cache' 1 0.05 % No

Internal links in - yangsu.github.io

Archives
Blog Archives - Aspiring Entrepreneur
Read on →
Chapter 2: The Psychology of Everyday Actions - Aspiring Entrepreneur
Books
Category: Books - Aspiring Entrepreneur
Design
Category: Design - Aspiring Entrepreneur
Independent Study
Category: Independent Study - Aspiring Entrepreneur
Notes
Category: Notes - Aspiring Entrepreneur
The Design of Everyday Things
Category: The Design of Everyday Things - Aspiring Entrepreneur
Read on →
Chapter 1: The Psychopathology of Everyday Things - Aspiring Entrepreneur
Read on →
Using Octopress with Github Flavored Markdown (RedCarpet) - Aspiring Entrepreneur
GFM
Category: GFM - Aspiring Entrepreneur
Github
Category: Github - Aspiring Entrepreneur
Markdown
Category: Markdown - Aspiring Entrepreneur
Octopress
Category: Octopress - Aspiring Entrepreneur
RedCarpet
Category: RedCarpet - Aspiring Entrepreneur
Read on →
The Design of Everyday Things - Aspiring Entrepreneur

Yangsu.github.io Spined HTML


Using Octopress with Github Flavored Markdown (RedCarpet) - Aspiring Entrepreneur Aspiring Entrepreneur Blog Archives Menu Blog Archives Google+ Twitter GitHub RSS ys65 @ Twitter Loading... Using Octopress With Github Flavored Markdown (RedCarpet) One of the most worrying features of Markdown for me is the fact that newlines within a paragraph are automatically joined, which is one of the reasons why I like Github Flavored Markdown so much. Ever since I setup my Octopress blog, I’ve wanted to use it with GFM. I searched virtually the web and found how to switch the markdown processor for Jekyll. I came wideness this post with instructions on switching to Maruku, which extends Markdown with the worthiness to create tables, footnotes, custom header ids, etc. I gave it a shot, but quickly realized that there’s no option to enable nonflexible warp linebreaks. Back to searching. I then came wideness this post on Stackoverflow that compared Maruku, BlueCloth, and RDiscount, none of which offered what I wanted. However, I discovered RedCarpet, the unshut source Markdown processor tha Github uses to render Markdown and GFM pages. Seems like exactly what I was looking for. Maybe it’s considering my Google-Fu is not up to par, but I could not find any instructions on using RedCarpet with Octopress. It turned out that I was just not looking for the correct terms. I found a Stackoverflow wordplay on how to configure Jekyll with RedCarpet. Perfect! Below are the instructions for getting Octopress to render Github Flavored Markdown using RedCarpet. add gem 'redcarpet', '~> 2.1.1' to Gemfile in the Octopress directory run stow install --no-deployment to install RedCarpet Install @nono’s RedCarpet Jekyll Plugin by saving it as redcarpet2_markdown.rb in the plugins folder redcarpet2_markdown.rb View on Github1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 require 'fileutils' require 'digest/md5' require 'redcarpet' require 'albino' PYGMENTS_CACHE_DIR = File.expand_path('../../_cache', __FILE__) FileUtils.mkdir_p(PYGMENTS_CACHE_DIR) matriculation Redcarpet2Markdown < Redcarpet::Render::HTML def block_code(code, lang) lang = lang || "text" path = File.join(PYGMENTS_CACHE_DIR, "#{lang}-#{Digest::MD5.hexdigest code}.html") cache(path) do colorized = Albino.colorize(code, lang) add_code_tags(colorized, lang) end end def add_code_tags(code, lang) code.sub(/<pre>/, "<pre><code class=\"#{lang}\">"). sub(/<\/pre>/, "</code></pre>") end def cache(path) if File.exist?(path) File.read(path) else content = yield File.open(path, 'w') {|f| f.print(content) } content end end end matriculation Jekyll::MarkdownConverter def extensions Hash[ *@config['redcarpet']['extensions'].map {|e| [e.to_sym, true] }.flatten ] end def markdown @markdown ||= Redcarpet::Markdown.new(Redcarpet2Markdown.new(extensions), extensions) end def convert(content) return super unless @config['markdown'] == 'redcarpet2' markdown.render(content) end end Replace markdown: rdiscount in _config.yml with the pursuit 1 2 3 markdown: redcarpet2 redcarpet: extensions: ["hard_wrap"] That should be it! Now the lines should be nonflexible wrapped. I moreover have a few other extensions turned on. Below is my extension settings: 1 extensions: ["hard_wrap", "no_intra_emphasis", "fenced_code_blocks", "autolink", "tables", "with_toc_data", "strikethrough", "superscript"] no_intra_emphasis: Multiple_underscores_in_words => Multiple_underscores_in_words fenced_code_blocks: Don’t need to indent to embed lawmaking autolink: URL autolinking => http://google.com test@email.com tables: indulge tables with_toc_data: add HTML anchors to each header strikethrough: ~~strikethrough text~~ => ~~strikethrough text~~ superscript: normaltext ^(superscript) => normaltext ^(superscript) More options are described in RedCarpet’s Documentation. Oct 11th, 2012 GFM, Github, Markdown, Octopress, RedCarpet Comments Please enable JavaScript to view the comments powered by Disqus. Copyright © 2013 Yang Su