2014-11-02 9 views
5

Dato il seguente file:In jekyll, come analizzare una variabile come markdown invece di stamparla così com'è?

_data 
    slides.yml 

che comprende

- 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 

Nel mio index.html ho

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

Come posso ottenere Jekyll interpretare {{} slide.desc } come markdown? Fa qualcosa di simile esiste:

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

Grazie!

Albert

risposta

Problemi correlati