主题
footnote
把数组或对象转换为 Markdown 脚注定义。
语法
knap
{{ value | footnote }}用法
- 数组使用从 1 开始的数字标签。对象的键会转换为 kebab-case 标签。
示例
数组脚注
json
{
"notes": [
"First item",
"Second item"
]
}knap
{{ notes | footnote }}md
[^1]: First item
[^2]: Second item对象脚注
json
{
"notes": {
"First Note": "Content 1",
"Second Note": "Content 2"
}
}knap
{{ notes | footnote }}md
[^first-note]: Content 1
[^second-note]: Content 2