Embedding Markdown in Jekyll HTML

后端 未结 7 489
一向
一向 2020-12-29 01:47

I\'m trying to nest markdown in an HTML file while using Jekyll. Is there a way to achieve something like the following?

# index.html

---
layout: default
--         


        
7条回答
  •  不知归路
    2020-12-29 02:23

    As of current Jekyll 3.6.2 life can be a lot simpler with the following two options:

    {{ "## Yes, this renders as markdown" | markdownify }}

    note the markdown-attribute:

    ## some markdown inside some html. `snippet` _italic_ **bold**

提交回复
热议问题