nizel-plugin-footnotes
v0.1.10
Published
Footnotes extension plugin for Nizel.
Downloads
2,077
Readme
nizel-plugin-footnotes
Footnote references and definitions for Nizel.
The plugin converts [^id] references into linked superscripts, removes footnote definition lines from the document body, and appends a footnotes section.
The browser build exposes NizelFootnotes from dist/footnotes.iife.js.
Install
npm install nizel-plugin-footnotesUsage
import { useNizel } from 'nizel';
import { footnotesPlugin } from 'nizel-plugin-footnotes';
const nizel = useNizel({
plugins: [footnotesPlugin()],
});Syntax
This sentence has a note.[^simple]
[^simple]: This is the footnote text.Unknown references are left untouched.
Options
| Option | Type | Default | Description |
| --- | --- | --- | --- |
| className | string | 'footnotes' | CSS class for the generated footnotes section. |
Output
<sup id="fnref-simple"><a href="#fn-simple" class="footnote-ref">1</a></sup>
<section class="footnotes"><ol><li id="fn-simple">...</li></ol></section>License
MIT
