Jekyll on Github Pages: any way to add footnotes in Markdown?

后端 未结 3 1358
别那么骄傲
别那么骄傲 2021-01-30 12:34

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

3条回答
  •  不要未来只要你来
    2021-01-30 12:58

    As of Jekyll 3.0.0, kramdown is the default Markdown processor, so the example in OP's question now works out of the box. The pattern is:

    Some text[^1].
    
    Some other text[^2].
    
    The identifier in the square brackets does not have to be numeric[^my_footnote].
    
    [^1]: Some footnote.
    [^2]: Other footnote.
    
    [^my_footnote]: This also works fine.
    

    Update 3rd Jan. 2020:

    • GitHub has its own markdown processor GFM, which is an extension of CommonMark. Both kramdown and GFM can be used to render GitHub Flavored Markdown.
    • Footnotes are not yet supported by GitHub Flavored Markdown, which means the above examples do not render correctly in the GitHub code repository.
    • Kramdown is still the default Markdown renderer for Jekyll. With kramdown, the above examples render correctly on sites based on GitHub Pages.

提交回复
热议问题