From a46e05e3778e1deb733cd5367b43e55221671b75 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Sun, 22 Feb 2026 10:47:45 -0600 Subject: [PATCH] fix: fixed footer links --- css/style.css | 12 ++++++++++++ eleventy.config.js | 15 ++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index a21187b..7559aac 100644 --- a/css/style.css +++ b/css/style.css @@ -299,11 +299,23 @@ a { margin-bottom: var(--space-tight); } +.footnote-ref { + vertical-align: super; + font-size: 0.75em; + line-height: 0; +} + .footnote-ref a { color: var(--color-text-link); text-decoration: none; } +sup { + vertical-align: super; + font-size: 0.75em; + line-height: 0; +} + .footnote-backref { margin-left: var(--space-tight); text-decoration: none; diff --git a/eleventy.config.js b/eleventy.config.js index 07da226..d329d2f 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -170,7 +170,7 @@ const sharedPlugins = [ markdownItFootnote, markdownItHashtag, markdownItMermaid, - [markdownItTaskLists, { enabled: true, label: true, labelAfter: true }], + [markdownItTaskLists, { enabled: true, label: true, labelAfter: false }], markdownItDetails, ]; @@ -188,6 +188,19 @@ const createMarkdownInstance = (extraPlugins = []) => { const md = createMarkdownInstance([markdownItStripTrailingHashtags]); +// Customize footnote rendering to remove brackets +md.renderer.rules.footnote_ref = (tokens, idx, options, env, slf) => { + const id = slf.rules.footnote_anchor_name(tokens, idx, options, env, slf); + const n = Number(tokens[idx].meta.id + 1).toString(); + let refid = id; + + if (tokens[idx].meta.subId > 0) { + refid += ':' + tokens[idx].meta.subId; + } + + return '' + n + ''; +}; + const tagExtractorMd = createMarkdownInstance(); module.exports = (eleventyConfig) => {