Sha256: ab47595a99315d473ff2232c6725a94893c36c90412d0a6f67e7702c335f4f51

Contents?: true

Size: 1.65 KB

Versions: 6

Compression:

Stored size: 1.65 KB

Contents

---
title: Webgen::ContentProcessor::Kramdown
---
## Description

This processor converts the content, which is assumed to be in kramdown format, to HTML by using the
[kramdown][1] library. The kramdown format is basically Markdown with some extensions like automatic
header ID generation, using markup inside HTML elements and some more. There are a [quick
reference][2] and a detailed [syntax documentation][3] available on the kramdown homepage.

One can customize how this processor works by using the following configuration options:

* `contentprocessor.kramdown.handle_links`: If `true` (the default), then all link URLs created via
  kramdown syntax are automatically run through the [relocatable tag](../tag/relocatable.html). This
  avoids using the `relocatable` tag explicitly but ensures valid links nonetheless.

* `contentprocesoor.kramdown.options`: This configuration option can be used to customize the
  kramdown processor. Have a look at the [kramdown homepage][1] for available options.

> kramdown is the default markup content processor for webgen as its markup syntax is easy to learn
> and nice to look at. Give it a try!
{:.info}

Example
-------

Here is a short sample of a text in kramdown markup:

    # This a h1 header
    {:#myid}

    You can just write *your* paragraphs here and
    [link][1] them below. This is **nice** format!

    > Citations are easy too.
    > Really. And you can assign them attributes.
    {:.information}

    * Lists
    * aren't
    * difficult
    * either.

    [1]: http://someurl.com


[1]: http://kramdown.rubyforge.org/
[2]: http://kramdown.rubyforge.org/syntax.html
[3]: http://kramdown.rubyforge.org/quickref.html

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
webgen-0.5.17 doc/contentprocessor/kramdown.page
webgen-0.5.15 doc/contentprocessor/kramdown.page
webgen-0.5.14 doc/contentprocessor/kramdown.page
webgen-0.5.13 doc/contentprocessor/kramdown.page
webgen-0.5.12 doc/contentprocessor/kramdown.page
webgen-0.5.11 doc/contentprocessor/kramdown.page