Jekyll 不解释 Markdown
我正在使用 jekyll.rb 创建网站。
我有一个名为 about.html 的页面:
<div class="grid_10 page">
{% include about_content.markdown %}
</div>
在 about_content.markdown 中,我有一些虚拟的 markdown:
A First Level Header
====================
A Second Level Header
---------------------
Hello!
由于某种原因,当呈现页面时,结果是这样的:
结果http://gabrielecirulli.com/p/20120107-203135.png
即使我将 YAML 前面的内容添加到我的 Markdown 文件中,也不会发生任何变化。
这是我的 _config.yml
safe: false
auto: false
server: false
server_port: 4000
baseurl: /
source: .
destination: ./_site
plugins: ./_plugins
future: true
lsi: false
pygments: false
markdown: maruku
permalink: date
maruku:
use_tex: false
use_divs: false
png_engine: blahtex
png_dir: images/latex
png_url: /images/latex
rdiscount:
extensions: []
kramdown:
auto_ids: true,
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
use_coderay: false
coderay:
coderay_wrap: div
coderay_line_numbers: inline
coderay_line_numbers_start: 1
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: style
如何让 jekyll 解释 markdown?
I'm creating a site using jekyll.rb.
I have a page called about.html:
<div class="grid_10 page">
{% include about_content.markdown %}
</div>
In about_content.markdown I have some dummy markdown:
A First Level Header
====================
A Second Level Header
---------------------
Hello!
For some reason, when the page is rendered, the result is this:
result http://gabrielecirulli.com/p/20120107-203135.png
Even if I add the YAML front matter to my markdown file nothing changes.
This is my _config.yml
safe: false
auto: false
server: false
server_port: 4000
baseurl: /
source: .
destination: ./_site
plugins: ./_plugins
future: true
lsi: false
pygments: false
markdown: maruku
permalink: date
maruku:
use_tex: false
use_divs: false
png_engine: blahtex
png_dir: images/latex
png_url: /images/latex
rdiscount:
extensions: []
kramdown:
auto_ids: true,
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
use_coderay: false
coderay:
coderay_wrap: div
coderay_line_numbers: inline
coderay_line_numbers_start: 1
coderay_tab_width: 4
coderay_bold_every: 10
coderay_css: style
How can I make jekyll interpret markdown?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须将其通过
markdownify
过滤器:为了保持 Markdown 代码缩进,但在 markdownification 之前删除缩进,我会编写一个专用插件,例如
_plugins/unindent.rb< /代码>:
You will have to pass it through the
markdownify
filter:To keep the Markdown code indented but remove the indentation before markdownification, I would write a dedicated plugin, called for example
_plugins/unindent.rb
: