feat: add eleventy-plugin-footnotes for accessible footnotes
Registers the KittyGiraudel footnotes plugin and adds {% footnotes %}
to post.njk below the article content.
Usage in content:
{% footnoteref "id" "Footnote text here" %}anchor text{% endfootnoteref %}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@ 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";
|
||||
@@ -154,6 +155,10 @@ 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);
|
||||
|
||||
// Post graph — GitHub-style contribution grid for posting frequency
|
||||
eleventyConfig.addPlugin(postGraph, {
|
||||
sort: "desc",
|
||||
|
||||
Reference in New Issue
Block a user