Blog 1

Random Talk on Random Thoughts

Kramdown's Markdown Attributes

| Comments |

While writing a post about purging old Linux kernels, I made use of fancybox’s plugin to show a popup window which contains some HTML elements.1

Original container for popup contentsView raw
1
2
3
4
5
6
7
8
9
10
<div id="list1" class="noscr">
<p>The <strong>bolded</strong> lines represent the packages that are
going to be completely removed.</p>
<!-- omitted a pre tag -->
</div>

<div id="list2" class="noscr">
<p>There's <em>no</em> lines beginning with <code>rc</code>.</p>
<!-- omitted a pre tag -->
</div>

I tried writing Markdown code inside these <div> containers, but the Markdown code failed to be changed to HTML. As a result, not being familiar with much of the Markdown syntax specified by kramdown, I simply write HTML inside these <div> elements.

Fancybox is great, but if I need to give up Markdown, then what’s the point of overcoming so many technical problems related to Octopress? Without Markdown and Vim, blogging will be incredibly difficult for me. For the former, when compared with HTML, it’s much easier to read and write; for the latter, it offers an efficient text editing experience.

Therefore, this afternoon, I browsed kramdown Syntax in kramdown’s official website, and found out that the markdown="1" attribute can solve this problem.2

Current container for popup contentsView raw
1
2
3
4
5
6
7
8
9
10
<div id="list1" class="noscr" markdown="1">
The **bolded** lines represent the packages that are going to be
completely removed.
<!-- omitted a pre tag -->
</div>

<div id="list2" class="noscr" markdown="1">
There's *no* lines beginning with `rc`.
<!-- omitted a pre tag -->
</div>

  1. Completely Remove Linux Kernels in Blog 1.

  2. HTML Blocks in kramdown Syntax.

Comments