☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

markdown

Table of contents

Description:

This key defines your markdown engine for parsing Markdown content into HTML and any configuration options for your engine.

Type:
Object
Properties:
enginestring#

This key defines which Markdown processing engine CloudCannon will use to convert between HTML and Markdown.

Defaults to: commonmark

Allowed values: commonmark kramdown

Show examplesHide examples

In this example, we have configured CloudCannon to use the kramdown Markdown engine.

Copied to clipboard
markdown:
  engine: kramdown
{
  "markdown": {
    "engine": "kramdown"
  }
}

In this example, we have configured CloudCannon to use the commonmark Markdown engine with custom options.

Copied to clipboard
markdown:
  engine: commonmark
  options:
    html: true
    breaks: true
{
  "markdown": {
    "engine": "commonmark",
    "options": {
      "html": true,
      "breaks": true
    }
  }
}
optionsObject#

This key defines configuration options for the Markdown processing engine.

The value is an object that can contain various options controlling how Markdown is converted to HTML and vice versa.

Show examplesHide examples

In this example, we have configured Markdown options to enable HTML output, convert line breaks, and enable GitHub Flavored Markdown.

Copied to clipboard
markdown:
  engine: commonmark
  options:
    html: true
    breaks: true
    gfm: true
{
  "markdown": {
    "engine": "commonmark",
    "options": {
      "html": true,
      "breaks": true,
      "gfm": true
    }
  }
}
Examples:

In this example, we have configured CloudCannon to use the commonmark Markdown engine with various options including attributes and attribute elements.

Copied to clipboard
markdown:
  engine: commonmark
  options:
    attributes: true
    attributes_elements:
      inline: none
      block: space right
      ul: below
      ol: below
      blockquote: below
      p: below
      img: below
      hr: below
      table: below
      li: none
{
  "markdown": {
    "engine": "commonmark",
    "options": {
      "attributes": true,
      "attributes_elements": {
        "inline": "none",
        "block": "space right",
        "ul": "below",
        "ol": "below",
        "blockquote": "below",
        "p": "below",
        "img": "below",
        "hr": "below",
        "table": "below",
        "li": "none"
      }
    }
  }
}
Open in a new tab