No commit activity in last 3 years
No release in over 3 years
A liquid block that allows you to use markdown in kramdown div block. This is my first gem/first ruby anything. May or may not work!
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10

Runtime

>= 3.0.5
 Project Readme

jekyll-div-markdown

Welcome to the readme of jekyll-div-markdown.

Usage

Sometimes you may want to use markdown inside HTML tags. And they might not be properly rendered. For kramdown style markdown, the easiest way to make sure that your markdown is rendered is to put your markdown inside a div block with a specific property.

<div markdown="1">
your markdown here
</div>

To make this more "jekyllish", and because I was curious about how gems and jekyll-extensions work, I made this fancy plugin. You can use it like this:

<details>
<summary>Hello</summary>
{% div_markdown %}
- world
- asd
- asd
{% enddiv_markdown %}
</details>

Code

The gem essentially puts your text inside the div_markdown block in a HTML div block.

def render(context)
            text = super
            "<div markdown=\"1\">\n #{text} \n</div>"

Disclaimer

Experimental. Absolutely no guarantees.