How to get all footnotes to show at bottom of post?

Hi everyone, how can footnotes be inserted in different markdown cards all be set to show at the very bottom of the post? Example:

(first markdown card)
First sentence [1]. Second sentence [2].

Then inserted video.

(second markdown card)
Third sentence [3].

  1. This is the first note. ↩︎

  2. This is the second note. ↩︎

  3. This is the second note. ↩︎

The only way I can think to do this would be to use one long MD card for the post.

There’s a solution suggested here (with code) by Corey Mahler. I should add that I’ve not tried this myself.

The lack of proper footnotes in Ghost is a significant weakness for many forms of long form writing. All of the workarounds I’ve tried are a bit kludgy.

Thanks @Cathy_Sarisky … these work well and are what I’m using.

I changed the regex to allow {{N}} instead as I compose in Obsidian (which has a Ghost plugin) and [[N]] is used for internal linking. I also added h2 and h3 elements to the first querySelectorAll as some of my headings (weirdly) have footnotes.

I still need to add image captions and make some tweaks to the CSS

Thank you for pointing out these solutions :pray: