0.0
No release in over 3 years
Write a longer description of the gem. Use as many lines as you like.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Project Readme

Jekyll_kramdown Gem Version

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, which can be relatively slow.

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:

  • class Wrap the output in a div with this class
  • no_auto_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)
  • maxOneScreenHigh Wrap the output in a div with class maxOneScreenHigh
  • style='padding: 1em;' Wrap the output in a div with this style
  • syntax_highlighter=rouge Specify highligher (case sensitive)

Here they are all used together:

{% kramdown no_auto_ids hard_wrap maxOneScreenHigh 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:

kramdown:
  input: GFM
  hard_wrap: false
markdown: kramdown

Development

After checking out this git repository, install dependencies by typing:

$ bin/setup

You should do the above before running Visual Studio Code.

Run the Tests

$ bundle exec rake test

Interactive Session

The following will allow you to experiment:

$ bin/console

Local Installation

To install this gem onto your local machine, type:

$ bundle exec rake install

To Release A New Version

To create a git tag for the new version, push git commits and tags, and push the new version of the gem to the Gem server, type:

$ bundle exec rake release

Contributing

Bug reports and pull requests are welcome at https://github.com/mlinn/jekyll_kramdown.

License

The gem is available as open source under the terms of the MIT License.