Summary
Discourse Footnote allows users to create markdown footnotes in posts.
Install Guide
This plugin is bundled with Discourse core . There is no need to install the plugin separately.
Enabling Footnote
The Footnote plugin is default enabled but can be disabled/enabled from the admin/plugins page:
Features
Once enabled, you can add footnotes to your posts by typing them in like this:
A sentence that needs a footnote. ^[The footnote]
Another sentence that needs a footnote. ^[The second footnote]
Or like this:
A sentence that needs a footnote. [^1]
Another sentence that needs a footnote. [^2]
[^1]: The footnote
[^2]: The second footnote
You can mix and match both styles within a post, as well as use non-numbered anchors.
There are two ways to display the footnotes, controlled by the display footnotes inline admin setting:
Non-inline:
Inline:
A sentence that needs a footnote
Another sentence that needs a footnote
The inline versions are both Quote and mobile-friendly.
Settings
Name
Description
enable markdown footnotes
enable footnote markdown on this site
display footnotes inline
enable inline expansion of footnotes
Hosted by us? This plugin is available on all of our hosting tiers Footnote | Discourse - Civilized Discussion
Development History
Discourse footnote re-packages the footnote markdown.it extension by @Vitaly as a Discourse plugin.
Last edited by @tobiaseigen 2025-07-16T20:45:27Z
Check document Perform check on document:
72 个赞
Kayla
2022 年9 月 29 日 20:51
58
只是提醒一下,该扩展似乎不允许使用常规的脚注 Markdown [^1]。除非我使用“内联”格式,否则我无法获得格式化的脚注,如下所示:
启用使用内联脚注格式的脚注会生成自动编号的脚注,这些脚注会一起出现在帖子下方,同时启用内联展开会产生省略号工具提示式体验,帖子下方不会出现脚注。如果您启用了内联展开选项,您的帖子预览窗口将显示为传统的编号脚注,但发布后您将看到内联展开的效果。
我很欣赏使用内联格式自动编号的脚注,只是我花了几个小时才弄清楚我应该如何实际格式化 Markdown 以及哪些选项可以让它们按预期运行。希望这个评论能帮助其他人避免同样的困惑。
编辑补充:内联展开选项是您的脚注在移动设备上的显示方式,无论该选项是否被启用(也适用于桌面)。
5 个赞
允许用户使用此 Discourse Footnote 插件创建内联弹出内容的方法:
将此插件与 Composer Footnote Button 主题组件 结合使用(它在 Composer/编辑器中提供了一个创建脚注的按钮)
您可以将任何内容放入弹出窗口中,包括 HTML。
示例:
文本
文本和图片上传
HTML 内容
14 个赞
jrgong
(jrgong)
2023 年8 月 21 日 17:04
66
页脚插件是否也适用于公共页面?在我的特定情况下,我希望它不适用于公共页面,并且只在常规主题视图中可见(用于内部笔记等)。
@jrgong – 不…
at the moment page publishing is not designed to support theme components or anything using plugin api and especially decorateCooked.
Not saying this is impossible, but we didn’t work on it and at this point I dont know if we will.
不过,有另一种方法 ,我正在为此开发一个主题组件… 在 Github 上 。
2 个赞
pfaffman
(Jay Pfaffman)
2023 年10 月 24 日 12:54
68
Looks like this got moved to core 17 hours ago.
I’ll let someone else update this appropriately.
Translation missing: en.The discourse-footnote plugin has been integrated into discourse core. Please remove the plugin from your app.yml and rebuild your container.
main ← footnote-plugin
opened 10:11PM - 18 Oct 23 UTC
Formerly https://github.com/discourse/discourse-footnote
3 个赞
迁移到core后,
我删除了app.yml中的插件并运行了./launcher rebuild app,
但设置仍然保留在插件页面上。就这样放着可以吗?
pfaffman
(Jay Pfaffman)
2023 年10 月 24 日 15:56
73
另一个问题是,您不再需要安装插件,如果您已经安装了,则无需在 yml 文件中包含 git clone。
2 个赞
我更新主题的速度太慢了,你已经抢先一步了。
无论如何,我现在还是要补充一下……
Discourse Footnote 现在已与 Discourse 核心捆绑在一起,因此无需单独安装此插件。
如果您是自托管用户,您应该会在仪表板上看到有关从 app.yml 中移除它的信息。
由我们托管?此更改不会以任何方式影响您。 您可以继续使用此插件,无需担心任何事情。
4 个赞
pfaffman
(Jay Pfaffman)
2023 年10 月 24 日 16:17
75
是的。抱歉。
太棒了!我就知道你有计划。我本应该等等的,因为我指出的其他事情确实是一个问题,而且已经被别人解决了,我本应该耐心等待,因为我知道你会处理它。(而且它也很漂亮!)。
距离现在还不到 24 小时,所以,你知道,这也很不错。
谢谢。
4 个赞
Turtle
2025 年2 月 13 日 01:52
77
有没有办法让脚注正常格式化?这样它就不会像这样与三个点内联?
而是像这样?
kiefferr
(Ryan Kieffer)
2025 年3 月 30 日 18:15
81
我注意到脚注不允许在脚注括号内使用许多常见的 Markdown 语法\n\n不是什么大问题,但这确实限制了您可以在脚注中放置内容的可用性!
您可以,请确保至少缩进 4 个空格。
例如:
这里是脚注引用[^1],还有另一个[^longnote]。
[^1]:这是脚注。
[^longnote]:这是一个有多段的脚注。
后续段落会缩进以显示它们属于前面的脚注。
* 项目 1
* 项目 2
**更多**文本
*斜体*
这里是脚注引用[^1],还有另一个[^longnote]。
[^1]:这是脚注。
[^longnote]:这是一个有多段的脚注。
后续段落会缩进以显示它们属于前面的脚注。
* 项目 1
* 项目 2
**更多**文本
*斜体*
渲染为: