all repos — hastysite @ e1dd00128c6fd25f3560ac771f6cc8482f0e418b

A high-performance static site generator.

Upgraded min to version 0.18.0.
h3rald h3rald@h3rald.com
Sun, 15 Jul 2018 16:32:31 +0200
commit

e1dd00128c6fd25f3560ac771f6cc8482f0e418b

parent

da8ed39db9faef85ceb14b0d53d884b5596ac975

3 files changed, 22 insertions(+), 13 deletions(-)

jump to
M hastysite.nimhastysite.nim

@@ -314,13 +314,13 @@ def.symbol("contents") do (i: In):

var contents = newSeq[MinValue](0) for j in hs.files.contents: contents.add i.fromJson(j) - i.push contents.newVal(i.scope) + i.push contents.newVal() def.symbol("assets") do (i: In): var assets = newSeq[MinValue](0) for j in hs.files.assets: assets.add i.fromJson(j) - i.push assets.newVal(i.scope) + i.push assets.newVal() def.symbol("output") do (i: In): i.push hs.dirs.output.newVal

@@ -328,8 +328,8 @@

def.symbol("input-fread") do (i: In): var vals = i.expect(["dict"]) var d = vals[0] - let t = d.dget("type".newVal).getString - let path = d.dget("path".newVal).getString + let t = i.dget(d, "type").getString + let path = i.dget(d, "path").getString var contents = "" if t == "content": contents = readFile(hs.dirs.tempContents/path)

@@ -340,11 +340,11 @@

def.symbol("output-fwrite") do (i: In): var vals = i.expect(["dict"]) var d = vals[0] - let id = d.dget("id".newVal).getString - let ext = d.dget("ext".newVal).getString + let id = i.dget(d, "id").getString + let ext = i.dget(d, "ext").getString var contents = "" try: - contents = d.dget("contents".newVal).getString + contents = i.dget(d, "contents").getString except: raise MetadataRequiredException(msg: "Metadata key 'contents' not found in dictionary.") let outname = id&ext

@@ -359,10 +359,10 @@

def.symbol("output-cp") do (i: In): var vals = i.expect(["dict"]) var d = vals[0] - let t = d.dget("type".newVal).getString - let path = d.dget("path".newVal).getString - let id = d.dget("id".newVal).getString - let ext = d.dget("ext".newVal).getString + let t = i.dget(d, "type").getString + let path = i.dget(d, "path").getString + let id = i.dget(d, "id").getString + let ext = i.dget(d, "ext").getString var infile, outfile: string let outname = id&ext if t == "content":

@@ -388,7 +388,7 @@ def.symbol("mustache") do (i: In):

var vals = i.expect(["dict", "string"]) let c = vals[0] let t = vals[1] - let ctx = newContext(%c) + let ctx = newContext(i%c) let tplname = t.getString & ".mustache" let tpl = readFile(hs.dirs.templates/tplname) i.push tpl.render(ctx, hs.dirs.templates).newval
M hastysite.nimblehastysite.nimble

@@ -1,6 +1,6 @@

[Package] name = "hastysite" -version = "1.2.0" +version = "1.3.0" author = "Fabio Cevasco" description = "A small but powerful static site generator" license = "MIT"
A site/contents/posts/v130-released.md

@@ -0,0 +1,9 @@

+----- +id: v130-released +title: "Version 1.3.0 released" +content-type: post +date: "15 July 2018" +timestamp: 1531665014 +----- + +* Upgraded min to v0.18.0.