From 605902a884cdeb9ad2f27f8555c312c0ceba229e Mon Sep 17 00:00:00 2001 From: George Cushen Date: Mon, 21 Nov 2016 09:26:51 +0000 Subject: [PATCH] Improve support for Markdown footnotes (fix #61) --- exampleSite/config.toml | 1 + exampleSite/content/post/writing-markdown-latex.md | 9 +++++++++ static/css/hugo-academic.css | 4 ++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index d7aa2fbd..9cbc5485 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -4,6 +4,7 @@ copyright = "© 2016 Your Name" languageCode = "en-us" theme = "academic" enableEmoji = true +footnotereturnlinkcontents = "^" # Enable comments by entering your Disqus shortname disqusShortname = "" diff --git a/exampleSite/content/post/writing-markdown-latex.md b/exampleSite/content/post/writing-markdown-latex.md index bbfb705b..e74a9f0e 100644 --- a/exampleSite/content/post/writing-markdown-latex.md +++ b/exampleSite/content/post/writing-markdown-latex.md @@ -70,6 +70,15 @@ I :heart: Academic :smile: > This is a blockquote. +## Footnotes + + I have more [^1] to say. + + [^1]: Footnote example. + +I have more [^1] to say. +[^1]: Footnote example. + ## Code highlighting Pass the *language* of the code, such as `python`, as a parameter after three backticks: diff --git a/static/css/hugo-academic.css b/static/css/hugo-academic.css index f20e6cb2..dbde3c27 100644 --- a/static/css/hugo-academic.css +++ b/static/css/hugo-academic.css @@ -772,7 +772,7 @@ footer a#back_to_top i { } /* Prevent navbar hiding initial content when jumping to in-page anchor. */ -*[id]:before { +*[id]:not([id^="fn"]):before { display: block; content: " "; margin-top: -70px; @@ -828,7 +828,7 @@ nav#navbar-main li { } /* Prevent navbar hiding initial content when jumping to in-page anchor. */ - *[id]:before { + *[id]:not([id^="fn"]):before { margin-top: -50px; height: 50px; }