Skip to content

Add auto-prefixing option to Goldmark's footnote extension #8045

@shaform

Description

@shaform

When we use footnotes in an article, the anchor links generated would be #fn:1, #fn:2, etc. However, this causes conflicts on the index/list page because there are multiple articles using footnotes.

Previously, the issue can be prevented in Blackfriday because the generated links could be #fn:uniq-id1 based on the [^uniq-id1] you wrote, but this is no longer supported for goldmark.

It looks like goldmark has implemented the footnoteAnchorPrefix feature yuin/goldmark@9e0189d. The feature should allow us to set an unique prefix for the footnote links generated for each article. This should allow us to work around the issue.

It would be great if hugo can also support this option so that the footnotes can be rendered correctly in the list page.

Also see discussions in Goldmark: How to configure the footnote anchor prefix?
.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions