2014-10-08 05:09:45 +00:00
|
|
|
---
|
|
|
|
title: Kramdown
|
2015-11-24 05:02:17 +00:00
|
|
|
category: Markup
|
2014-10-08 05:09:45 +00:00
|
|
|
---
|
|
|
|
|
2023-03-14 01:52:21 +00:00
|
|
|
### About
|
|
|
|
{: .-intro}
|
|
|
|
|
|
|
|
Kramdown is a Markdown parser in Ruby.
|
|
|
|
|
|
|
|
- <https://kramdown.gettalong.org/>
|
|
|
|
|
2014-10-09 13:23:28 +00:00
|
|
|
### Configuration
|
|
|
|
|
|
|
|
* `parse_block_html` - process kramdown syntax inside blocks
|
|
|
|
* `parse_span_html` - process kramdown syntax inside inlines
|
|
|
|
* `html_to_native` - convert html elements to native elements
|
|
|
|
|
|
|
|
{::options parse_block_html="true" /}
|
|
|
|
|
|
|
|
For the GFM parser:
|
|
|
|
|
|
|
|
* `hard_wrap`
|
|
|
|
|
|
|
|
http://kramdown.gettalong.org/parser/gfm.html
|
|
|
|
|
2014-10-08 05:09:45 +00:00
|
|
|
### For jekyll (gh-pages)
|
|
|
|
|
|
|
|
# _config.yml
|
|
|
|
markdown: kramdown
|
|
|
|
kramdown:
|
|
|
|
input: GFM
|
|
|
|
|
|
|
|
### Footnotes (Kramdown)
|
|
|
|
|
|
|
|
This is some text.[^1]. Other text.[^footnote].
|
|
|
|
|
|
|
|
[^1]: Some *crazy* footnote definition.
|
|
|
|
|
|
|
|
### Abbreviations (Kramdown)
|
|
|
|
|
|
|
|
This is some text not written in HTML but in another language!
|
|
|
|
|
|
|
|
*[another language]: It's called Markdown
|
|
|
|
*[HTML]: HyperTextMarkupLanguage
|
|
|
|
|
|
|
|
### Classes and IDs (Kramdown)
|
|
|
|
|
|
|
|
A simple paragraph with an ID attribute.
|
|
|
|
{: #para-one}
|
|
|
|
|
|
|
|
> A blockquote with a title
|
|
|
|
{:title="The blockquote title"}
|
|
|
|
{: #myid}
|
|
|
|
|
|
|
|
* {:.cls} This item has the class "cls"
|
|
|
|
|
|
|
|
{:.ruby}
|
|
|
|
Some code here
|
|
|
|
|
|
|
|
### References
|
|
|
|
|
|
|
|
* http://kramdown.gettalong.org/syntax.html
|
2014-10-09 13:23:28 +00:00
|
|
|
* http://kramdown.gettalong.org/parser/kramdown.html
|