降价没有在 Jekyll 站点上呈现?

sur*_*190 6 jekyll

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)

ast*_*ark 5

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)