Allow markdown attribute lists to be used in title render hooks

Fixes #8270
This commit is contained in:
Bjørn Erik Pedersen
2021-02-22 11:27:14 +01:00
parent e7e194435b
commit cd0c5d7ef3
4 changed files with 54 additions and 7 deletions

View File

@@ -19,6 +19,10 @@ import (
"github.com/gohugoio/hugo/identity"
)
type AttributesProvider interface {
Attributes() map[string]string
}
type LinkContext interface {
Page() interface{}
Destination() string
@@ -45,6 +49,9 @@ type HeadingContext interface {
Text() string
// PlainText is the unrendered version of Text.
PlainText() string
// Attributes (e.g. CSS classes)
AttributesProvider
}
// HeadingRenderer describes a uniquely identifiable rendering hook.