Added extra logging.
h3rald h3rald@h3rald.com
Sun, 25 Aug 2019 19:57:22 +0200
1 files changed,
5 insertions(+),
0 deletions(-)
jump to
M
hastysite.nim
→
hastysite.nim
@@ -238,6 +238,7 @@ var meta = newJObject()
for f in hs.dirs.contents.walkDirRec(): if f.isHidden: continue + info("Preprocessing: " & f); let content = f.preprocessContent(hs.dirs.contents & DirSep, meta) let dest = hs.dirs.temp/f dest.parentDir.createDir@@ -253,7 +254,9 @@ let assets = toSeq(hs.dirs.assets.walkDirRec())
let contentDir = hs.dirs.tempContents let assetDir = hs.dirs.assets hs.files.contents = contents.map(proc (f: string): JsonNode = return contentMetadata(f, contentDir, meta)) + info("Total Contents: " & $hs.files.contents.len) hs.files.assets = assets.map(proc (f: string): JsonNode = return assetMetadata(f, assetDir)) + info("Total Assets: " & $hs.files.assets.len) proc init*(dir: string) = var json = newJObject()@@ -333,7 +336,9 @@ i.push i.fromJson(hs.settings)
def.symbol("contents") do (i: In): var contents = newSeq[MinValue](0) + debug("JSON Contents requested") for j in hs.files.contents: + debug(j) contents.add i.fromJson(j) i.push contents.newVal()