hswg: preset some attributes

This commit is contained in:
Přemysl Eric Janouch 2022-10-05 20:38:13 +02:00
parent 103704b183
commit d643187333
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 3 additions and 0 deletions

View File

@ -193,6 +193,9 @@ func renderEntry(name string, e *Entry) error {
if html, e.Metadata, err = Render(f, configuration.NewConfiguration( if html, e.Metadata, err = Render(f, configuration.NewConfiguration(
configuration.WithFilename(e.PathSource), configuration.WithFilename(e.PathSource),
configuration.WithLastUpdated(e.mtime), configuration.WithLastUpdated(e.mtime),
configuration.WithAttribute("toc", "preamble"),
configuration.WithAttribute("toc-title", "+++<h2>Contents</h2>+++"),
configuration.WithAttribute("source-highlighter", "chroma"),
)); err != nil { )); err != nil {
return err return err
} }