在jekyll中,如何将变量解析为markdown而不是按原样打印?

alb*_*o56 9 jekyll

给出以下文件:

_data
  slides.yml
Run Code Online (Sandbox Code Playgroud)

包括

- 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
Run Code Online (Sandbox Code Playgroud)

在我的index.html中我有

{% for slide in site.data.slides %}
  <section class="slide">
    <h2>{{ slide.title }}</h2>
    {{ slide.desc }}
  </section>
{% endfor %}
Run Code Online (Sandbox Code Playgroud)

如何让Jekyll将{{slide.desc}}解释为降价?这样的事情存在:

...
{{ slide.desc AS markdown }}
...
Run Code Online (Sandbox Code Playgroud)

谢谢!

阿尔伯特

alb*_*o56 15

找到答案了!

...
{{ slide.desc | markdownify }}
...
Run Code Online (Sandbox Code Playgroud)

这是参考.