Choose your preferred SSG:
Choose your preferred SSG:

Configuring your Markdown engine

To store and edit Markdown content in CloudCannon, we need to process it into HTML to make it editable. You can use any Markdown engine you want when building your site, this only covers the Markdown content you edit inside CloudCannon.

CloudCannon supports the CommonMark and Kramdown specifications. The implementations for these are markdown-it (JavaScript) and kramdown (Ruby).

Jekyll content

CloudCannon automatically reads your settings from _config.yml to match editing and builds.

To use Kramdown:

  1. Remove or set the markdown field to kramdown in _config.yml
  2. Set your options in the kramdown field in _config.yml
_config.yml
kramdown:
  input: GFM
  auto_ids: true

To use CommonMark:

  1. Add the jekyll-commonmark gem to your Gemfile
  2. Set the markdown field to CommonMark in _config.yml
  3. Set your options in the commonmark field in _config.yml
Gemfile
source 'https://rubygems.org'

gem 'jekyll', '3.8.5'

group :jekyll_plugins do
  gem 'jekyll-commonmark', '1.3.1'
end
_config.yml
markdown: CommonMark

commonmark:
  options: ["SMART", "UNSAFE"]
  extensions: ["strikethrough", "table"]

The UNSAFE option is required for HTML content inside your Markdown files to render correctly.

Hugo content

Eleventy content

Other content

CommonMark does not support a syntax to define attributes on elements. In order to preserve attributes, that content saves as HTML within your Markdown files.

Was this article helpful? or Suggest an improvement >