git clone ''

(ql:quickload :cl-libhoedown)



Common Lisp Binding for Hoedown, a standards compliant, fast, secure markdown processing library in C.


You need to first install Hoedown, either clone or download it from this page.

git clone
cd hoedown
make && make install

Then just (ql:quickload :cl-libhoedown) in your REPL. Note that before it's collected by Quicklisp, you need to put it in your quicklisp/local-projects directory.


All API symbols are exported from package cl-libhoedown(and its nicknames libhoedown or hoedown).


HOEDOWN> (render "#h1

This is Head1.


This is Head2.


This is Head3. Over")


<p>This is Head1.</p>


<p>This is Head2.</p>


<p>This is Head3. Over</p>

Simple to use. If it's a pathname that passed to render, it will use uiop:read-file-string first and then do the rendering.

HOEDOWN> (render #P"/tmp/")

<p>This is Head1.</p>


<p>This is Head2.</p>


<p>This is Head3. Over</p>

There are a lot of options that can affect the behavior of the rendering.


Hoedown Extensions, which affects the behavior of Markdown syntax such as tables, autolinking, footnotes… The enabled extensions are:

'(:hoedown-ext-tables :hoedown-ext-fenced-code :hoedown-ext-footnotes
  :hoedown-ext-autolink :hoedown-ext-strikethrough :hoedown-ext-underline
  :hoedown-ext-highlight :hoedown-ext-quote :hoedown-ext-superscript
  :hoedown-ext-math :hoedown-ext-no-intra-emphasis :hoedown-ext-space-headers
  :hoedown-ext-math-explicit :hoedown-ext-disable-indented-code)

You can enable multiple extensions by using add-hoedown-extensions. For example, if a markdown file /tmp/ looks like this:


This is Head1. Let's test some `autolink`.

* Google:
* Bing:
* My Blog:


This is Head2. Let's test some `strikethrough`.

Trump is the next USA president? ~~This is totally nonsence.~~


This is Head3. Test some `footnotes` then over.

McCLIM[^1] now has a new website!

May 2016 Quicklisp[^2] dist update now available!


[^1]: McCLIM,

[^2]: Quicklisp,
HOEDOWN> (add-hoedown-extensions :hoedown-ext-autolink ;; Automatically parse URLs into links
                                 :hoedown-ext-footnotes ;; Enables Markdown Extra style footnotes
                                 :hoedown-ext-strikethrough ;; Enables ~~striking~~ text
HOEDOWN> (render #P"/tmp/")

<p>This is Head1. Let&#39;s test some <code>autolink</code>.</p>

<li>Google: <a href=\"\"></a></li>
<li>Bing: <a href=\"\"></a></li>
<li>My Blog: <a href=\"\"></a></li>


<p>This is Head2. Let&#39;s test some <code>strikethrough</code>.</p>

<p>Trump is the next USA president? <del>This is totally nonsence.</del></p>


<p>This is Head3. Test some <code>footnotes</code> then over.</p>

<p>McCLIM<sup id=\"fnref1\"><a href=\"#fn1\" rel=\"footnote\">1</a></sup> now has a new website!</p>

<p>May 2016 Quicklisp<sup id=\"fnref2\"><a href=\"#fn2\" rel=\"footnote\">2</a></sup> dist update now available!</p>


<div class=\"footnotes\">

<li id=\"fn1\">
<p>McCLIM, <a href=\"\"></a>&nbsp;<a href=\"#fnref1\" rev=\"footnote\">&#8617;</a></p>

<li id=\"fn2\">
<p>Quicklisp, <a href=\"\"></a>&nbsp;<a href=\"#fnref2\" rev=\"footnote\">&#8617;</a></p>


There is also a function delete-hoedown-extensions, which I guess you'll barely have to use…


Hoedown html flags, which derectly affects the behavior of hoedown html renderers. The enabled flags are:

'(:hoedown-html-skip-html :hodown-html-escape :hoedown-html-hard-wrap :hoedown-html-use-html)

You can enable multiple flags by using add-hoedown-html-flags, and there's also a function delete-hoedown-html-flags.


Reallocation unit size (0 = read-only buffer) for a hoedown buffer, set to 16 by default.


Nesting levels for a hoedown html renderer, set to 0 by default.


Max nesting for a hoedown document, set to 16 by default.


Retrieve Hoedown's version numbers, returning 4 values where the first is a string representing the version and the 2nd, 3rd and 4th are major, minor and revision number repsectively.

HOEDOWN> (hoedown-version)



For now, this binding only supports a subset of features from Hoedown. So the feature work are obviously make the APIs more complete.




Copyright (c) 2016 David Gu (