Markdown 未转换为 HTML。
_config.yml
# Build settings
markdown: kramdown
input: GFM
# Permalinks
permalink: pretty
encoding: UTF-8
Run Code Online (Sandbox Code Playgroud)
前端输出
<article class="post-content">
<!-- Contents of md files here in plain text-->
</article>
Run Code Online (Sandbox Code Playgroud)
如kramdown 语法中所述,您必须在 html-block 元素中启用降价解析。有两种方法可以做到这一点:
全局:在你的 _config.yml 添加:
kramdown:
parse_block_html: true
Run Code Online (Sandbox Code Playgroud)
或者在你的 Markdown 文档的开头(不在 yaml-header 中)设置:
{::options parse_block_html="true" /}
Run Code Online (Sandbox Code Playgroud)
本地:添加markdown="1"到您的 html-block,以获取呈现的块内的降价。
所以在你的情况下,会读到:
<article markdown="1" class="post-content">
<!-- Contents of md files here in plain text-->
</article>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3229 次 |
| 最近记录: |