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 markdown? Does something like this exist:
...
{{ slide.desc AS markdown }}
...
Thanks!
Albert
Jekyll also has the {% link %} tag, which can be used to link to a post, page, collection document, or file. The big difference between link and post_url is that the link tag requires the file's full path e.g., directory and extension.
Jekyll is a static site generator. It takes text written in your favorite markup language and uses layouts to create a static website. You can tweak the site's look and feel, URLs, the data displayed on the page, and more.
Found the answer!
...
{{ slide.desc | markdownify }}
...
Here is the reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With