Ran into a “fun” issue while migrating my blog to Hugo.
I wrote a post on Sir Terry Pratchett’s passing in 2015 and, in keeping with his footnote shenanigans, I added some footnotes. This seemed to break pagination the moment I added the third entry, concatenating all further posts on the page to that post; when I removed it, the posts displayed properly again.
Investigating further it triggers the pagination issue the moment the page the perfect length where it would have tried to break in the list of footnotes. Any longer or shorter displays just fine…
I have created a test on my site to show the effect, please have a look at “Test3”, which displays the issue, “Test6” where the filler negates it. You probably won’t be able to see it, but if I “fix” Test3, the others with multiple footnotes look fine…
Am I missing something obvious, or have I run into a bug?
Yeah, you can clearly see where Hugo loses focus (the grey bar) with the section that should have been on the same level as the grey bar, the blue use, being rendered as child entities.
I have tried to make the tests as self-documenting as possible, but I’d me more than willing to stash them somewhere if anyone knows of a decent place to do so.
In the meantime I have added test1.md, test3.md, and test6.md to my pastebin.
That’s because of the automatic summary you are using.
The text that is taken for the summary is split in the middle of the footnote list.
The content is rendered as HTML and that’s why the footnote list (ol) is not closed.
all subsequent stuff is now part of the list item where it has been split.
Workaround:
use manual sumary by adding <!--more--> on a single line (even after the footnotes work). But imho footnotes have no place in a summary
test3.md
---
title: "Test3"
date: 2024-10-02T13:15:43+02:00
draft: false
---
Some filler text to trigger the bug.
This is the contents of the post below the separation:
....
---
An entity[^blog] with a footnote[^footnote]
[^blog]: AKA Blog Post, but let's at least give it some heft.
[^footnote]: As "promised"[^kinda]
[^kinda]: Only kinda[^said] promised, I know, but still
[^said]: Well, "as I said" at least...
<!--more-->
as you are on github, the most easy way is a repo/branch that is fully functional for replay