Footnote Rendering Test
This post tests footnote rendering, tooltip interaction, and reference navigation.
Basic Footnotes
A sentence with a single footnote.1 A sentence with a second footnote.2
Numbering follows the order of first reference rather than definition order, so this footnote is numbered after the two above,3 even though its definition appears first in the source.
Multiple References to One Footnote
The same footnote may be referenced several times.4 Additional references get IDs such as fnref1:1 and fnref2:1, and the footnote item gets one back-reference per citation.4 All three references should show the same tooltip and jump to the same footnote item.4
Rich Inline Content
Footnote content can contain bold, italic, inline code, deleted text, and links.5
Multiple Blocks
A footnote may contain several block elements; the tooltip should keep the markup and drop only the back-reference links.6
Long Content
Long footnote content should wrap inside the tooltip instead of overflowing the page.7 The tooltip stays open while the pointer moves into it, so links inside long footnotes remain clickable.7
Footnotes in Different Contexts
- A list item with a footnote.8
- A list item without a footnote.
A blockquote with a footnote.9
| Column | Description |
|---|---|
| Cell | A table cell with a footnote.10 |
Non-ASCII Content
English and 中文可以出现在同一个脚注中。11 纯中文脚注的标点和换行也应正常显示。12
Edge Cases
Adjacent references: two markers back to back.13 14
Labels with hyphens: a footnote label may contain hyphens.15
Undefined reference: the marker below is not defined and should render as literal text: [^undefined]
Unused definition: the definition at the bottom is never referenced and should be silently dropped.
Verification Checklist
- Hovering a reference shows a tooltip with the rendered footnote HTML (no back-reference arrows).
- Moving the pointer into the tooltip keeps it open, and links inside it are clickable.
- Clicking a reference jumps to the footnote item at the end of the post.
- Clicking a back-reference returns to the matching reference; a footnote cited three times has three back-references.
- With
params.tooltip = false, references fall back to the native plain-texttitletooltip.
The first basic footnote. ↩︎
The second basic footnote. ↩︎
This definition appears first in the source but is referenced last. ↩︎
Content with bold, italic,
inline code,deleted text, and a link to the FixIt website. The tooltip should render all of it as HTML, not plain text. ↩︎First paragraph of the footnote.
- A list item
- Another list item with
inline code
A blockquote inside the footnote.
1console.log('code block inside a footnote')Final paragraph with a link to the Hugo documentation after the block elements. ↩︎
This footnote is intentionally long to exercise tooltip sizing and wrapping. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 这是一段较长的中文内容,用于检查 Tooltip 的最大宽度、自动换行以及中英文混排时的折行表现。链接 FixIt 位于脚注末尾,将指针移入 Tooltip 后应当仍可点击。 ↩︎ ↩︎
Footnote referenced from a list item. ↩︎
Footnote referenced from a blockquote. ↩︎
Footnote referenced from a table cell. ↩︎
Mixed English and 中文 with
代码and 粗体. ↩︎这是一个包含中文、English、数字 12345 和全角标点(,。!?)的脚注,用于检查 Tooltip 的换行与字体渲染。 ↩︎
First of two adjacent footnotes. ↩︎
Second of two adjacent footnotes. ↩︎
A footnote whose label contains hyphens. ↩︎