Jekyll logo

jekyll_kramdown

Published 2025-11-08.
Time to read: 1 minutes.

This page is part of the jekyll_plugins collection.

jekyll_kramdown allows a mixture of HTML and any supported flavor of Markdown in the same file.

Defines a kramdown block tag that processes Kramdown (a flavor of Markdown) embedded in HTML files.

This plugin uses the facilities of the kramdown plugin.

Installation

Add the following to your Jekyll website’s Gemfile:

group :jekyll_plugins do
  gem 'jekyll_kramdown'
end

And then execute:

$ bundle

Options

Invocation options

The available options for the kramdown block tag are:

  • noauto_ids Do not generate id tags
  • hard_wrap Enable GitHub wrapping default
  • input=GFM Specify flavor of markdown (case sensitive)
  • math_engine=katex Specify math engine (case senstitive)
  • syntax_highlighter=rouge Specify highligher (case sensitive)
  • table-container Wrap the output within <div class="table-container"></div>

Here they are all used together:

{% kramdown noauto_ids hard_wrap table-container
  input=GFM
  math_engine=katex
  syntax_highlighter=rouge %}
## Subheading here

- This is a perfectly good point
- YAP (yet another point)

{% href label='This link was generated by a Jekyll Support plugin.'
          url='https://www.mslinn.com/jekyll_plugins'%}
{% endkramdown %}


The above example shows the jekyll_href tag plugin being used within kramdown text, which was embedded in an HTML page.

Document Options

Kramdown options can be specified in the content to some degree and with some fussing.

Usage

Add the following in any HTML file within a Jekyll project:

{% kramdown %}
## Heading

Some text

- option 1
- option 2
{% endkramdown %}

Modify _config.yaml to set kramdown options. I recommend these:

kramdown:
  input: GFM
  hard_wrap: false
markdown: kramdown
* indicates a required field.

Please select the following to receive Mike Slinn’s newsletter:

You can unsubscribe at any time by clicking the link in the footer of emails.

Mike Slinn uses Mailchimp as his marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp’s privacy practices.