Updated to latest version of min.
h3rald h3rald@h3rald.com
Mon, 15 Mar 2021 19:37:59 +0100
7 files changed,
28 insertions(+),
19 deletions(-)
M
config.nim
→
config.nim
@@ -1,5 +1,5 @@
const pkgName* = "HastySite" - pkgVersion* = "1.3.5" + pkgVersion* = "1.3.6" pkgDescription* = "A small but powerful static site generator" pkgAuthor* = "Fabio Cevasco"
M
hastysite.nim
→
hastysite.nim
@@ -457,7 +457,7 @@ setLogFilter(lvlNotice)
proc usage(scripts: bool, hs: HastySite): string = var text = """ $1 v$2 - a tiny static site generator - (c) 2016-2018 Fabio Cevasco + (c) 2016-2021 Fabio Cevasco Usage: hastysite command
A
site/contents/posts/v136-released.md
@@ -0,0 +1,9 @@
+----- +id: v136-released +title: "Version 1.3.6 released" +content-type: post +date: "20 March 2021" +timestamp: 1616231032 +----- +* Updated min to v0.35.0 (contains breaking changes to scripts and rules syntax) +* Compiled with Nim v1.4.4
M
site/scripts/build.min
→
site/scripts/build.min
@@ -1,10 +1,10 @@
;Builds a site by processing contents and assets. 'hastysite import -"Preprocessing..." notice +"Preprocessing..." notice! preprocess -"Processing rules..." notice +"Processing rules..." notice! process-rules -"Postprocessing..." notice +"Postprocessing..." notice! postprocess -"All done." notice +"All done." notice!
M
site/scripts/clean.min
→
site/scripts/clean.min
@@ -1,8 +1,8 @@
;Deletes all temporary and output files. 'hastysite import -"Cleaning temporary folder..." notice +"Cleaning temporary folder..." notice! clean-temp -"Cleaning output folder..." notice +"Cleaning output folder..." notice! clean-output -"All done." notice +"All done." notice!
M
site/scripts/page.min
→
site/scripts/page.min
@@ -4,9 +4,9 @@ "" :title
false :valid-id ( - (string) expect first :ident + (str) expect first :ident ident "^[a-z0-9-]+$" match? :valid-regexp - (. "contents") => "/" join ls =filelist + (. "contents") => "/" join ls :filelist filelist (filename "(.+)\..+$" search 1 get) map ident in? not :valid-file valid-regexp valid-file and ) ^validate@@ -15,7 +15,7 @@
(valid-id not) ( "ID" ask @ident ident validate @valid-id - (valid-id not) ("ID must not be already used and it must contain only lowercase letters, numbers, or -" warn) when + (valid-id not) ("ID must not be already used and it must contain only lowercase letters, numbers, or -" warn!) when ) while "Title" ask @title@@ -28,7 +28,7 @@ -----
" (ident title) => % :metadata -metadata puts +metadata puts! ("Create page?" confirm) ( (ident ".md") => "" join :fn
M
site/scripts/post.min
→
site/scripts/post.min
@@ -6,18 +6,18 @@ ts "d MMMM yyyy" tformat :date
false :valid-id ( - (string) expect first :ident - ident "^[a-z0-9-]+$" match :valid-regexp - (. "contents" "posts") => "/" join ls =filelist + (str) expect first :ident + ident "^[a-z0-9-]+$" match? :valid-regexp + (. "contents" "posts") => "/" join ls :filelist filelist (filename "(.+)\..+$" search 1 get) map ident in? not :valid-file valid-regexp valid-file and -) :validate +) ^validate (valid-id not) ( "ID" ask @ident ident validate @valid-id - (valid-id not) ("ID must not be already used and it must contain only lowercase letters, numbers, or -" warn) when + (valid-id not) ("ID must not be already used and it must contain only lowercase letters, numbers, or -" warn!) when ) while "Title" ask @title@@ -32,7 +32,7 @@ -----
" (ident title date ts) => % :metadata -metadata puts +metadata puts! ("Create post?" confirm) ( (ident ".md") => "" join :fn