Builds / Jekyll
Markdown
CloudCannon officially supports two Markdown processors for Jekyll. Jekyll uses these to convert your Markdown for your live site, and CloudCannon uses it to convert your Markdown for your editors.
Kramdown
Kramdown is the default Markdown processor for Jekyll.
To use Kramdown for your build and editors:
- Remove or set the
markdown
field tokramdown
in_config.yml
- Set your options in the
kramdown
field in_config.yml
(optional)
_config.yml
kramdown:
input: GFM
auto_ids: true
CommonMark
CommonMark is new Markdown specification which aims to become standard and unambiguous.
To use CommonMark for your build and editors:
- Add the
jekyll-commonmark
gem to yourGemfile
- Set the
markdown
field toCommonMark
in_config.yml
- 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
options 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.