imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
537 stars 138 forks source link

footnotes within callout shortcodes do not render correctly #379

Open ahgraber opened 3 months ago

ahgraber commented 3 months ago

Description

Footnote notation [^3] in callout shortcodes do not seem to be identified correctly; do not get included in footnotes.

Steps To Reproduce

  1. Post and commit of the issue - https://github.com/ahgraber/AIMLbling-about/blob/a8f21e74308c0aad446d9b29b72922c767fcd2d2/content/blog/the-compounding-error-of-generative-models/index.md

Expected Behavior

The footnote link should be superscripted and the footnote should be included.

Actual Behavior

The footnote link was left as plaintext "[^3]" and the footnote was not rendered

Screenshots

footnote link unrecognized

image

footnote is not included (link should be 3 and it is missing)

image

raw text of what should render

image

Environment

Additional Context

imfing commented 3 months ago

Hi @ahgraber thank you for reporting this.

Currently the callout shortcode doesn't have the context of its parent page, thus the footnote was not correctly parsed along with other ones in the parent page.

I'll see what I could do to fix it.

ahgraber commented 3 months ago

@imfing Thanks! I saw comments on hugo forums about the same; it seems like it might require jumping through a lot of hoops to provide the parent context, which might induce a lot of edge cases? If this becomes a wontfix because of the trouble, I fully understand!

imfing commented 2 months ago

I'd keep this open, while waiting to see if there could be any solutions from Hugo community in the future.