使用Kramdown/Jekyll定义脚注位置 [英] Defining footnote location with Kramdown/Jekyll

查看:102
本文介绍了使用Kramdown/Jekyll定义脚注位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行在kramdown 1.10上的Jekyll博客,并且尝试将脚注列表的位置更改为无济于事.该操作旨在在github-pages网站上进行,但在本地也不起作用.

I have a Jekyll blog that runs on kramdown 1.10, and I have tried to change the location of my footnote list to no avail. This is intended to go on a github-pages site, but doesn't work locally either.

根据此问题,有一种方法可以在通过定义映射到帖子中的DOM对象的自定义标识符,使用Kramdown来处理文档.

According to this issue, there is a way to add a footnote location elsewhere in your documents using Kramdown by defining a custom identifier that maps to a DOM object in your post.

尤其是我已将其添加到我的_config.yml

Particularly I have added this to my _config.yml

kramdown:
  footnote_location: 'my_footnotes'

并在布局中的所需位置尝试了所有这些变体:

and tried all of these variations atthe desired location in my layout:

<ol id="my_footnotes" class="my_footnotes"></ol>

<div id="my_footnotes" class="my_footnotes"></div>

<div id="my_footnotes" class="my_footnotes">
   <ol id="my_footnotes" class="my_footnotes"></ol>
</div>

在特定位置生成脚注的正确方法是什么?

What is the correct way to generate footnotes in a specific location?

推荐答案

在您参考的问题中,他们谈论了

In the issue you reference, they talk about the implementation commit.

有趣的标准是测试文件脚注位置.

这是将脚注放置在页面末尾以外的其他地方的方法.

This is how to place your footnotes somewhere else than at the end of your page.

* footnotes will be placed here. This line is necessary
{:footnotes}

这篇关于使用Kramdown/Jekyll定义脚注位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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