diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-02-22 13:27:14 +0300 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2021-02-23 20:08:39 +0300 |
commit | cd0c5d7ef32cbd570af00c50ce760452381df64e (patch) | |
tree | 13dcde7bb470d2ea96e7b0ab11377d1b2baa9cf1 /markup/converter | |
parent | e7e194435b4c566f47d644f2e60c096ea1866254 (diff) |
Allow markdown attribute lists to be used in title render hooks
Fixes #8270
Diffstat (limited to 'markup/converter')
-rw-r--r-- | markup/converter/hooks/hooks.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/markup/converter/hooks/hooks.go b/markup/converter/hooks/hooks.go index 622d503ef..6f08a2161 100644 --- a/markup/converter/hooks/hooks.go +++ b/markup/converter/hooks/hooks.go @@ -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. |