Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-02-22 13:27:14 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-02-23 20:08:39 +0300
commitcd0c5d7ef32cbd570af00c50ce760452381df64e (patch)
tree13dcde7bb470d2ea96e7b0ab11377d1b2baa9cf1 /markup/converter
parente7e194435b4c566f47d644f2e60c096ea1866254 (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.go7
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.