all repos — hastysite @ 2300d059fd1ce6dd84a93e1b28434db0153f086d

A high-performance static site generator.

Fixed deprecation warnings.
h3rald h3rald@h3rald.com
Sun, 30 Apr 2023 13:58:53 +0000
commit

2300d059fd1ce6dd84a93e1b28434db0153f086d

parent

c8780a81b797d6b585d75caf3455117bab589f1a

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

jump to
M hastysite.nimhastysite.nim

@@ -142,7 +142,7 @@ if s.startsWith("----"):

delimiter.inc else: cfg &= s&"\n" - except: + except CatchableError: discard if not obj.hasKey("contents"): obj["contents"] = newJObject()

@@ -166,7 +166,7 @@ warn e.msg

else: discard p.close() - except: + except CatchableError: meta = newJObject() meta["path"] = %fileid meta["id"] = %fileid.changeFileExt("")

@@ -377,7 +377,7 @@ let ext = i.dget(d, "ext").getString

var contents = "" try: contents = i.dget(d, "contents").getString - except: + except CatchableError: raise MetadataRequiredException(msg: "Metadata key 'contents' not found in dictionary.") let outname = id&ext let outfile = hs.dirs.output/outname

@@ -507,4 +507,4 @@ quit(0)

else: discard else: - discard + discard
M hastysite.nimblehastysite.nimble

@@ -9,7 +9,7 @@ bin = @["hastysite"]

installDirs = @["minpkg", "hastysitepkg"] # Deps -requires: "nim >= 1.4.4, zippy >= 0.5.6" +requires: "nim >= 1.6.12, zippy >= 0.5.6" before install: exec "nimble install -y nifty"