mirror of
https://git.mills.io/prologic/zs
synced 2024-11-21 21:06:10 +03:00
Add source to variables when rendering to support reveal.js and slide decks or re-using the content source
This commit is contained in:
parent
ce6360eb75
commit
c8c4ac861a
5
main.go
5
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()
|
||||
|
Loading…
Reference in New Issue
Block a user