Defining footnote location with Kramdown/Jekyll

僤鯓⒐⒋嵵緔 提交于 2019-12-06 11:36:22

问题


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.

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.

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?


回答1:


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

The interesting par is the test file for footnote placement.

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}


来源:https://stackoverflow.com/questions/37201781/defining-footnote-location-with-kramdown-jekyll

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!