mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
Add config options: disable footnote anchor prefix and header ID suffix
New config options: * DisableFootnoteAnchorPrefix - bool - default: false * DisableHeaderIDSuffix - bool - default: false
This commit is contained in:
@@ -85,8 +85,11 @@ func GetHtmlRenderer(defaultFlags int, ctx RenderingContext) blackfriday.Rendere
|
||||
FootnoteReturnLinkContents: viper.GetString("FootnoteReturnLinkContents"),
|
||||
}
|
||||
|
||||
if len(ctx.DocumentId) != 0 {
|
||||
if len(ctx.DocumentId) != 0 && !viper.GetBool("DisableFootnoteAnchorPrefix") {
|
||||
renderParameters.FootnoteAnchorPrefix = ctx.DocumentId + ":" + renderParameters.FootnoteAnchorPrefix
|
||||
}
|
||||
|
||||
if len(ctx.DocumentId) != 0 && !viper.GetBool("DisableHeaderIDSuffix") {
|
||||
renderParameters.HeaderIDSuffix = ":" + ctx.DocumentId
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user