Write Haml in Markdown, Syntax Highlight with Pygments, and Pretty Print the output HTML, in Ruby.
Install
gem install post-modern
Usage
---
title: My Post
tags: a, b, c
---
Here's a table of stuff:
@@@ haml
%table
%thead
%tr
%th Column A
%th Column B
%tbody
%tr
%td Item A
%td Item B
@@@
This table is:
1. written in Haml
2. compiled to html, along with the markdown
require 'post-modern'
post = Post.read("docs/my-post.md")
{
:title => "My Post",
:tags => ["a", "b", "c"],
:format => "markdown",
:keywords => [],
:slug => "my-post",
:file => "post.md",
:published => false
:content => %{
<p>Here's a table of stuff:</p>
<table>
<thead>
<tr>
<th>Column A</th>
<th>Column B</th>
</tr>
</thead>
<tbody>
<tr>
<td>Item A</td>
<td>Item B</td>
</tr>
</tbody>
</table>
<p>This table is:</p>
<ol>
<li>written in Haml</li>
<li>compiled to html, along with the markdown</li>
</ol>}
}
from https://github.com/viatropos/post-modern