diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 001fb8d..6b24af7 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -100,9 +100,6 @@ withBlogSidebar: true {# Rich reply context with h-cite microformat #} {% include "components/reply-context.njk" %} - {# Footnotes collected from {% footnoteref %} shortcodes in the content #} - {% footnotes %} - {# AI usage disclosure — articles and notes only #} {% if '/articles/' in page.url or '/notes/' in page.url %}
diff --git a/eleventy.config.js b/eleventy.config.js index f46f7ed..84f904e 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -6,6 +6,7 @@ import { eleventyImageTransformPlugin } from "@11ty/eleventy-img"; import sitemap from "@quasibit/eleventy-plugin-sitemap"; import markdownIt from "markdown-it"; import markdownItAnchor from "markdown-it-anchor"; +import markdownItFootnote from "markdown-it-footnote"; import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import { minify } from "html-minifier-terser"; import { minify as minifyJS } from "terser"; @@ -20,7 +21,6 @@ import { fileURLToPath } from "url"; const esmRequire = createRequire(import.meta.url); const postGraph = esmRequire("@rknightuk/eleventy-plugin-post-graph"); -const pluginFootnotes = esmRequire("eleventy-plugin-footnotes"); const __dirname = dirname(fileURLToPath(import.meta.url)); const siteUrl = process.env.SITE_URL || "https://example.com"; @@ -99,6 +99,7 @@ export default function (eleventyConfig) { linkify: true, // Auto-convert URLs to clickable links typographer: true, }); + md.use(markdownItFootnote); md.use(markdownItAnchor, { permalink: markdownItAnchor.permalink.headerLink(), slugify: (s) => s.toLowerCase().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, ""), @@ -155,9 +156,7 @@ export default function (eleventyConfig) { // Mermaid diagram support — renders ```mermaid code blocks as diagrams eleventyConfig.addPlugin(pluginMermaid); - // Accessible footnotes — {% footnoteref "id" "note text" %}…{% endfootnoteref %} - // Render collected footnotes with {% footnotes %} in the post layout. - eleventyConfig.addPlugin(pluginFootnotes); + // markdown-it-footnote handles standard [^1] Markdown footnote syntax // Post graph — GitHub-style contribution grid for posting frequency eleventyConfig.addPlugin(postGraph, { diff --git a/package-lock.json b/package-lock.json index dbc6a14..73e31c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,6 +33,7 @@ "lite-youtube-embed": "^0.3.2", "markdown-it": "^14.1.1", "markdown-it-anchor": "^9.2.0", + "markdown-it-footnote": "^4.0.0", "pagefind": "^1.3.0", "rss-parser": "^3.13.0", "satori": "^0.19.2", @@ -4082,6 +4083,12 @@ "markdown-it": "*" } }, + "node_modules/markdown-it-footnote": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/markdown-it-footnote/-/markdown-it-footnote-4.0.0.tgz", + "integrity": "sha512-WYJ7urf+khJYl3DqofQpYfEYkZKbmXmwxQV8c8mO/hGIhgZ1wOe7R4HLFNwqx7TjILbnC98fuyeSsin19JdFcQ==", + "license": "MIT" + }, "node_modules/markdown-it/node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", diff --git a/package.json b/package.json index 7c1baa4..991e831 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "lite-youtube-embed": "^0.3.2", "markdown-it": "^14.1.1", "markdown-it-anchor": "^9.2.0", + "markdown-it-footnote": "^4.0.0", "pagefind": "^1.3.0", "rss-parser": "^3.13.0", "satori": "^0.19.2",