all repos — hastysite @ 6b4b057d363e58f7b7d9945df87b8536a24cec8f

A high-performance static site generator.

Fixed support for fields in markdown symbol.
h3rald h3rald@h3rald.com
Sun, 15 Oct 2017 15:34:38 +0200
commit

6b4b057d363e58f7b7d9945df87b8536a24cec8f

parent

7527e2d0ce39807fb481b275750cc06628a9cd65

1 files changed, 5 insertions(+), 1 deletions(-)

jump to
M hastysite.nimhastysite.nim

@@ -352,7 +352,11 @@ let t = vals[1]

let options = HastyOptions(toc: false, output: nil, css: nil, watermark: nil, fragment: true) var fields = initTable[string, proc():string]() for item in c.qVal: - fields[item.qVal[0].getString] = proc(): string = return $$item.qVal[1] + closureScope: + let key = item.qVal[0].getString + let val = $$item.qVal[1] + fields[key] = proc(): string = + return val var hastyscribe = newHastyScribe(options, fields) let file = t.getString() i.push hastyscribe.compileFragment(file, hs.dirs.contents).newVal