Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Markdown is not being rendered on Jekyll Site?

Tags:

jekyll

Markdown is not being convertedto HTML.

_config.yml

# Build settings
markdown: kramdown
    input: GFM
# Permalinks
permalink:        pretty
encoding:         UTF-8

output in frontend

<article class="post-content">
<!-- Contents of md files here in plain text-->
</article>
like image 988
tread Avatar asked Jan 09 '15 11:01

tread


2 Answers

As described in the kramdown Syntax you have to enable parsing of markdown in html-block elements. There are two ways to do this:

Globally: in your _config.yml add:

kramdown:  
  parse_block_html: true

or at the beginning of your markdown document (not in yaml-header) set:

{::options parse_block_html="true" /}

Locally: add markdown="1" to your html-block, to get the markdown inside the block rendered.

So in your case that would read:

<article markdown="1" class="post-content">
<!-- Contents of md files here in plain text-->
</article>
like image 102
astark Avatar answered Oct 08 '22 21:10

astark


I had this line:

markdown_ext: "markdown, mkdown, mkdn, mkd, md"

which was messing it up

like image 33
tread Avatar answered Oct 08 '22 20:10

tread