Skip to content

balde/balde-markdown

Repository files navigation

balde-markdown

A balde extension that adds Markdown support.

How to install

You need to install Discount and balde before trying to install this extension.

With all the dependencies in place, type:

./autogen.sh  # if installing from Git repository
./configure
make
make install  # or sudo make install

How to use

Supposing that you have a template variable called content, with the markdown content, you can just add something like this to the template:

{% include "balde-markdown.h" %}
<html>
<body>
{{ markdown(content) }}
</body>
</html>

The balde-markdown.h header should be in your include path.

If you want to render the markdown content outside of the templates (e.g. to do some caching), you can use the balde_markdown_parse() function, as defined below:

gchar* balde_markdown_parse(balde_app_t *app, const gchar *mkd_source);

The gchar* returned should be free'd with g_free() after usage.

Online tests

This extension is tested by a Jenkins instance. You can see the results below:

Build Status

About

A balde extension that adds Markdown support.

Resources

License

Stars

Watchers

Forks

Packages

No packages published