CloudCannon officially supports two Markdown processors: Kramdown and CommonMark.
Your SSG uses these to convert your Markdown for your live site, and CloudCannon uses it to convert your Markdown for your editors.
Kramdown is the default Markdown processor for Jekyll.
To use Kramdown for your build and editors:
markdown
field to kramdown
in _config.yml
kramdown
field in _config.yml
(optional)kramdown:
input: GFM
auto_ids: true
CommonMark is new Markdown specification which aims to become standard and unambiguous.
To use CommonMark for your build and editors:
jekyll-commonmark
gem to your Gemfile
markdown
field to CommonMark
in _config.yml
commonmark
field in _config.yml
source 'https://rubygems.org'
gem 'jekyll', '3.8.5'
group :jekyll_plugins do
gem 'jekyll-commonmark', '1.3.1'
end
markdown: CommonMark
commonmark:
options: ["SMART", "UNSAFE"]
extensions: ["strikethrough", "table"]
The UNSAFE
option is required for HTML content inside your Markdown files to render correctly.
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.
Goldmark is the default Markdown processor for Hugo. It’s CommonMark compliant, so works with the CloudCannon editor.
The UNSAFE
option is required for HTML content inside your Markdown files to render correctly.
See the Hugo Documentation for information on how to configure Goldmark.
Changing defaultMarkdownHandler
in your site’s config may cause inconsistent behaviour within the CloudCannon editor.