Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Footnotes are not displayed in any blog powered by mataroa.blog #945

Open
TheBestPessimist opened this issue Jan 4, 2025 · 3 comments

Comments

@TheBestPessimist
Copy link

Describe the bug
Footnotes are not displayed.
image

What did you expect to happen?
I expect footnotes to be displayed too.

URLs where the bug occurs

To reproduce
Steps to reproduce the behavior:

  1. Go to any blog powered by https://mataroa.blog (i gave 2 exmples)
  2. Open Readability

Initially I opened this bug in obsidianmd/obsidian-clipper#293, but that extension uses readability to parse the web pages, so i am opening this bug here too.

@TheBestPessimist TheBestPessimist changed the title BUG: Footnotes are not displayed by any blog powered by mataroa.blog BUG: Footnotes are not displayed in any blog powered by mataroa.blog Jan 4, 2025
@gijsk
Copy link
Contributor

gijsk commented Jan 9, 2025

Looks like the footnotes are in a <div> that suggests "footnote" and otherwise an unlabelled ol/li collection, which isn't being picked up in lieu of all the paragraph tags. :-(

@TheBestPessimist
Copy link
Author

TheBestPessimist commented Jan 10, 2025

Is there a way to fix that in the website itself (and everything that is generated using the platform)? if yes, i can open an issue there and see if it can be fixed.

@sirodoht
Copy link

Hey, I'm the creator and maintainer of mataroa.blog. Thanks for reporting this. The source of the footnote HTML structure is the python-markdown package, and specifically its footnote extension (line of code here).

I tested firefox reader view (which I assume uses the readability package) with changing the footnote div into a p and it seems to have picked up the footnotes. However, making this change permanent is harder and I don't think it will happen soon.

Some of the ways to approach this:

  • Change the python-markdown package, and make it so that the div turns into a p element.
  • Change mataroa to not use the official/bundled python-markdown footnote extension but create a custom one which is practically the same but with the small change of turning the footnote div into a p.
  • Change mataroa to include an override of that particular extension function that introduces the div, and make it into a p. I'm not sure how to do this without replacing the whole footnote extension but maybe it's possible.
  • Change mataroa to not use the python-markdown lib at all and switch to another markdown library. We are considering this independently of this change, and it might happen at some point.
  • Change mataroa to include a post-markdown-compilation operation in which we turn the footnote div into a p.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants