How to add footnotes to GitHub-flavoured Markdown?

前端 未结 10 1026
夕颜
夕颜 2021-01-29 17:21

I am just trying to add footnotes in my GitHub Gist, but it doesn\'t work:

Some long sentence. [^footnote]

[^footnote]: Test, [Link](https://google.com).
         


        
10条回答
  •  说谎
    说谎 (楼主)
    2021-01-29 17:59

    I wasn't able to get Surya's and Matteo's solutions to work. For example, "(#f1)" was just displayed as text, and didn't become a link. However, their solutions led me to slightly different solution. (I also formatted the footnote and the link back to the original superscript a bit differently.)

    In the body of the text:

    Yadda yadda1
    

    At the end of the document:

    1Here is the footnote text.
    

    Clicking on the superscript in the footnote returns to the superscript in the original text.

提交回复
热议问题