Discourse Footnote

:mega: This plugin is now bundled with Discourse core and is enabled by default. There is no need to install the plugin separately.

:discourse2: Summary Discourse Footnote allows users to create markdown footnotes in posts.
:hammer_and_wrench: Repository Link https://github.com/discourse/discourse-footnote
:open_book: Install Guide How to install plugins in Discourse

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[1]
Another sentence that needs a footnote[2]

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

:discourse2: 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.


  1. The footnote ↩︎

  2. The second footnote ↩︎

69 Likes

Just a heads up that the extension does not seem to all allow for the regular markdown for footnotes using [^1]. I do not get formatted footnotes unless I use the “inline” formatting, like so:

Enabling footnotes using inline footnote formatting results in auto-numbered footnotes which then appear below the post together, while also-enabling inline expansion enables the ellipsis tooltip-like experience with no footnotes appearing below the post. If you have the inline expansion option enabled, your post preview window will look like traditional numbered footnotes, but you’ll see the inline expanded effect after publishing.

I appreciate the automatically-numbered footnotes using the inline formatting, it just took me a few tries to figure out how I should actually format the markdown and which options would get them to behave as desired. Hopefully this comment helps someone else avoid the same confusion.

Edit to add: The inline expansion option is how your footnotes will appear on mobile, regardless of whether that option is enabled (for desktop also).

5 Likes

Recipe for allowing your users to create inline popup content using this Discourse Footnote Plugin:

Combine this Plugin with the Composer Footnote Button Theme Component [1] (it provides a button in the Composer/Editor to create footnotes)

You can put anything inside the popups, including HTML.

Examples:

Text [2]


Text and Image Upload [3]


HTML Content [4]


  1. (install them both) ↩︎

  2. Plain text here. ↩︎

  3. Text and Image Upload
    cookie-monster ↩︎

  4. brainstorm

    When you encounter an open source group for the first time, it may be a bewildering experience. Whether posting to a mailing list for the first time, blogging about the project you’re taking on or hanging out on an IRC channel - the way people interact, and what they expect from each other is pretty different than in classroom or with friends and family.


    Openness and Sharing

    Open source communication can vary a lot. A core value held in common is that sharing code is good. Regardless of license, language or indentation style, open source developers create, share and modify source code together.

    ↩︎

11 Likes

Does the footnote plugin also work on public pages? In my specific case I want it NOT to work on public pages and only be visible in the regular topic view (to use it for internal notes etc)

@jrgong – no…

However, there is this alternative approach for which I’m in the process of developing a Theme Component… over on Github.

2 Likes

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.
3 Likes

After moving to core,

I deleted the plugin from app.yml and ran ./launcher rebuild app,

but the settings remain on the plugin page. Is it okay to just leave it like this?

That’s the new one. :+1: Here’s a shot of both for comparison:

4 Likes

That’s a really nice sound! :+1: Thank you for sharing. :smiling_face_with_three_hearts:

Thanks for mentioning this, I just pushed a fix.

2 Likes

The other issue is that you don’t need to install the plugin anymore, and if you have installed it, you need not to include that git clone in your yml file.

1 Like

I was too slow in updating the topic with the new info and you beat me to it. :slight_smile:

I’ll add my bit now anyway…


:information_source: Discourse Footnote has now been bundled with Discourse core, so this plugin will no longer need to be installed separately. :partying_face:

If you self-host you should see some information on your dashboard about removing it from your app.yml.

:discourse2: Hosted by us? This change will not affect you in any way. :+1: You can continue to enjoy this plugin and not worry about a thing.

3 Likes

Yeah. Sorry about that.

That’s awesome! I knew you had a plan. I should have just waited, as the other thing I pointed out was, in fact, a problem that was, in fact, dealt with by someone else, and I should have just been patient since I knew you were going to hangle it. (And it’s so pretty, too!).

It’s still been less than 24 hours, so, you know, that’s pretty good too.

Thanks.

3 Likes

3 posts were split to a new topic: Add Footnote option to the composer gear menu