From: James Mills <1290234+prologic@users.noreply.github.com> Date: Wed, 29 Mar 2023 13:37:20 +0000 (+1000) Subject: Add source to variables when rendering to support reveal.js and slide decks or re... X-Git-Tag: 0.4.0~9 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c8c4ac861a9fc5677aef9d8c82e19cf1ebf8d7ec;p=aya.git Add source to variables when rendering to support reveal.js and slide decks or re-using the content source --- diff --git a/main.go b/main.go index 3df8d58..8f77ca1 100644 --- a/main.go +++ b/main.go @@ -467,13 +467,14 @@ func buildMarkdown(path string, w io.Writer, vars Vars) error { return err } - content, err := render(body, v) + source, err := render(body, v) if err != nil { return err } + v["source"] = source buf := &bytes.Buffer{} - if err := Parser.Convert([]byte(content), buf); err != nil { + if err := Parser.Convert([]byte(source), buf); err != nil { return err } v["content"] = buf.String()