In jekyll, how to parse a variable as markdown rather than print it as it is?

Given the following file:

_data slides.yml 

which includes

 - title: Slide one desc: | welcome to the slideshow This is an open-source slideshow, built with [deck.js](https://github.com/imakewebthings/deck.js), GitHub and [Jekyll](http://jekyllrb.com). - title: Slide two desc: | Second slide with bullet points * Hello world * This is a slideshow 

In my index.html I have

 {% for slide in site.data.slides %} <section class="slide"> <h2>{{ slide.title }}</h2> {{ slide.desc }} </section> {% endfor %} 

How can I get Jekyll to interpret {{slide.desc}} as markdowns? Something like this exists:

 ... {{ slide.desc AS markdown }} ... 

Thanks!

Albert

+5
source share
1 answer

Found an answer!

 ... {{ slide.desc | markdownify }} ... 

Here is the link .

+8
source

Source: https://habr.com/ru/post/1206036/


All Articles