Jekyll在Github Pages:在Markdown中添加脚注的任何方法? [英] Jekyll on Github Pages: any way to add footnotes in Markdown?

查看:70
本文介绍了Jekyll在Github Pages:在Markdown中添加脚注的任何方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近已在各种博客上使用Github Pages上的Jekyll,我喜欢将Markdown推送到Github,由他们来处理.我想继续以这种方式使用它(而不是在本地运行Jekyll,而只是将预先生成的网站推送到Github),因为如果我不在自己的机器上,Github UI可以轻松添加和调整帖子.

I've recently switched over to using Jekyll on Github Pages for my various blogs, and love that I can just push Markdown to Github and they handle the processing. I'd like to continue using it this way (rather than running Jekyll locally and just pushing the pre-generated site to Github), since the Github UI makes it easy to add and tweak posts if I'm not at my own machine.

只有一件事我无法弄清楚:我无法让Markdown脚注发挥作用.我正在使用这种样式:

There's just one thing I haven't been able to figure out: I can't get Markdown footnotes working. I'm using this style:

I bet you'd like more information about this sentence [^1].

[^1]: Well lucky for you, I've included more information in footnote form.

我确实找到了一个帖子(在某处),该帖子建议为redcarpet markdown处理器启用脚注扩展名,但这也没有做到这一点:

I did find one post (somewhere) that suggested enabling a footnotes extension for the redcarpet markdown processor, but this doesn't do it either:

markdown: redcarpet
redcarpet:
  extensions: ["footnotes"]

有什么方法可以使用Markdown脚注,而无需先生成静态网站,然后再将其推送到Github?

Is there any way to use Markdown footnotes without pre-generating the static site before pushing it to Github?

推荐答案

我使用kramdown进行markdown解析,并且很好地处理了脚注.

I use kramdown for markdown parsing and it handles footnotes nicely.

在您的_config.yml文件中更改此行:

Change this line in your _config.yml file:

markdown: redcarpet

收件人:

markdown: kramdown

这篇关于Jekyll在Github Pages:在Markdown中添加脚注的任何方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆