all repos — hastysite @ ae74e80ffd8bbcc53fd86de3ba56ed72326609b8

A high-performance static site generator.

Added extra logging.
h3rald h3rald@h3rald.com
Sun, 25 Aug 2019 19:57:22 +0200
commit

ae74e80ffd8bbcc53fd86de3ba56ed72326609b8

parent

4132586c9b6378bf26ef6caede1f0b7d2226b4b0

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

jump to
M hastysite.nimhastysite.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()