MaggieAppleton / maggieappleton.com

⚠️ Now retired. My previous, poorly constructed digital garden built with Gatsby and MDX. Updated garden here: https://github.com/MaggieAppleton/maggieappleton.com-V2
https://maggieappleton.com
Other
161 stars 24 forks source link

mobile footnotes not working #134

Closed devinhalladay closed 2 years ago

devinhalladay commented 2 years ago

hi! just dropping by to say that i noticed your tufte footnotes are not expanding at smaller breakpoints. looks like they might just need a bit of state :) i'm going to solve it for myself (using some of the footnote code for my new site) and can post a PR if you don't get to it first!

devinhalladay commented 2 years ago

jk, seems they are working again 🧐

devinhalladay commented 2 years ago

@MaggieAppleton I just wanted to drop by and let you know I've written a patch for gatsby-remark-reference-footnotes which automatically transforms markdown footnotes[^1] into a jsx <Footnote> component! This means you can write normal markdown footnotes without needing to write out (and, more importantly, manually number) Footnote components in your mdx files.

There might be some bugs — it's not thoroughly tested and I've never manipulated an AST before — but it's working great for me right now. AFAIK no changes are needed to the footnote component itself for this to work. I may break out my patch into its own remark plugin, but for now I'll keep using gatsby-remark-reference-footnotes as my base.

The patch is available here and can be applied by:

Feel free to take this and use it — it might make writing posts with sidenotes just a little bit easier :)

[^1]: Like this one!