all repos — hastysite @ b279848803ee9fc9a77965c34eeef2d036c659d3

A high-performance static site generator.

Fixed warning when compiling for Nim v1.4.0
h3rald h3rald@h3rald.com
Sat, 31 Oct 2020 23:09:48 +0100
commit

b279848803ee9fc9a77965c34eeef2d036c659d3

parent

2df4c91d6b33427a636572ff6eb0e86e7cb8434b

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

jump to
M hastysite.nimhastysite.nim

@@ -116,7 +116,7 @@ var matches: array[0..1, string]

discard def.match(PEG_CSS_IMPORT, matches) let partial = folder/"_" & matches[0].strip & ".css" var contents = "" - if partial.existsFile: + if partial.fileExists: contents = partial.readFile result = result.replace(def, contents) else:

@@ -234,7 +234,7 @@ file.close()

result.scripts[key] = %desc proc preprocess*(hs: var HastySite) = - if hs.dirs.tempContents.existsDir: + if hs.dirs.tempContents.dirExists: hs.dirs.tempContents.removeDir var meta = newJObject() for f in hs.dirs.contents.walkDirRec():