Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds styling to footnotes so that they better match the theme and also includes enhancements their readability.
Footnote styling
Styles both the footnote numeral ([1]) and the footnote return icon (↩︎). Both now use the
$primary color
(_vars.scss
) and implement a background on hover using lightened$primary
—this a similar style that tags use. The blockquote footnote now matches this new style. Footnotes automatically add an<hr>
above the footnotes area at the bottom of the post. Previously this provided no margin from the content and was unstyled. Both issues are corrected and<hr>
now uses$grey
(_vars.scss
).Footnote highlighting
Adds highlighting to the footnotes in a similar way to what Wikipedia does. When a user clicks on a footnote and the footnotes area is shown, the footnote in question is highlighted using
$primary
(_vars.scss
) as a background with a quick gradient animation. This animation will end with a very light background highlighting the footnote. This background can improve readability when navigating posts that have a large number of footnotes.I'm not sold on using
$primary
, so if another color (or a separate var) is better suited it can easily be changed.Notes and known issues
Hugo changed from Blackfriday to Goldmark for Markdown. While this adds lots of improvements, it has limited how you can customize various syntax elements—including footnotes.
fn:1
which causes clashes with other lists from other posts. While Blackfriday had the option to use a reference id (seeplainIDAnchors = false
), this does not appear to be the case for Goldmark.footnoteReturnLinkContents
in Blackfriday).