0
我正在使用Jekyll頁面,該頁面顯示其標記語法突出顯示代碼的項目列表。我有一個數據文件,這樣Jekyll語法突出顯示數據變量
# myitems.yaml
id: 'someID'
updated: 'someDate'
items:
- item:
id: "0001"
content: "
*This is italicized*, and so is _this_.
**This is bold**, and so is __this__. &
Use ***italics and bold together*** if you ___have to___.
``` html
<script>alert() some content</script>
<p>paragraph</p>
```"
- item:
id: "0002"
content: "some more content"
內容所以items[].content
有降價+一些代碼是語法高亮。
我在我的items.html
液體訪問這些數據作爲
<ul>
{% for item in site.data.myitems.items %}
<li id="{{item.id}}">
<div>{{ item.content | strip | markdownify}}</div>
</li>
{% endfor %}
</ul>
我使用胭脂語法高亮。 markdown已正確解析爲html,但html語法突出顯示在items.html
部分中不起作用。語法高亮顯示工作正常在崗的身體,但不是在{% include items.html %}
<em>This is italicized</em>, and so is <em>this</em>. <strong>This is bold</strong>, and so is <strong>this</strong>. & Use <strong><em>italics and bold together</em></strong> if you <strong><em>have to</em></strong>. <code class="highlighter-rouge">html <script>alert() some content</script> <p>paragraph</p></code>
任何幫助嗎?