aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-10-05 20:38:13 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-10-05 20:38:27 +0200
commitd643187333e1318e2fbf6314d07d1f6c6bd54930 (patch)
tree99f3f56c702c3218f12707d471122909eb88c9ae
parent103704b183cbfeab341ecf4314b4d82694b07ce1 (diff)
downloadhaven-d643187333e1318e2fbf6314d07d1f6c6bd54930.tar.gz
haven-d643187333e1318e2fbf6314d07d1f6c6bd54930.tar.xz
haven-d643187333e1318e2fbf6314d07d1f6c6bd54930.zip
hswg: preset some attributes
-rw-r--r--hswg/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/hswg/main.go b/hswg/main.go
index 458fe87..dca9fea 100644
--- a/hswg/main.go
+++ b/hswg/main.go
@@ -193,6 +193,9 @@ func renderEntry(name string, e *Entry) error {
if html, e.Metadata, err = Render(f, configuration.NewConfiguration(
configuration.WithFilename(e.PathSource),
configuration.WithLastUpdated(e.mtime),
+ configuration.WithAttribute("toc", "preamble"),
+ configuration.WithAttribute("toc-title", "+++<h2>Contents</h2>+++"),
+ configuration.WithAttribute("source-highlighter", "chroma"),
)); err != nil {
return err
}