all repos — hastysite @ 1bba6e186f372ad2f414cf8b5716c09967c35a8e

A high-performance static site generator.

Updated to latest version of min and hastyscribe; added ci.
h3rald h3rald@h3rald.com
Sun, 25 Apr 2021 11:51:42 +0000
commit

1bba6e186f372ad2f414cf8b5716c09967c35a8e

parent

f24b31790152ab5b9be87deeca9580086c22c0ca

5 files changed, 67 insertions(+), 9 deletions(-)

jump to
A .github/workflows/ci.yml

@@ -0,0 +1,57 @@

+name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + tags-ignore: [ '**' ] + pull_request: + branches: [ master ] + tags-ignore: [ '**' ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "ci" + ci: + # The type of runner that the job will run on + runs-on: ubuntu-20.04 + env: + CHOOSENIM_CHOOSE_VERSION: stable + CHOOSENIM_NO_ANALYTICS: 1 + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - name: install musl-gcc + run: sudo apt-get install -y musl-tools + + - name: Update $PATH + run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH + + - name: Install Nim + run: | + curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh + sh init.sh -y + + - name: Install nifty + run: nimble install -y nifty + + - name: Install zippy + run: nimble install zippy + + - name: Install deps + run: nifty install + + - name: Build + run: nimble build -d:release --opt:size --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --cpu:amd64 --os:linux + + - name: Test + run: | + cd site + ../hastysite build
M config.nimconfig.nim

@@ -1,5 +1,5 @@

const pkgName* = "HastySite" - pkgVersion* = "1.3.6" + pkgVersion* = "1.3.7" pkgDescription* = "A small but powerful static site generator" pkgAuthor* = "Fabio Cevasco"
M hastysite.nimhastysite.nim

@@ -432,13 +432,9 @@ var vals = i.expect(["dict", "str"])

let c = vals[0] let t = vals[1] let options = HastyOptions(toc: false, output: "", css: "", watermark: "", fragment: true) - var fields = initTable[string, proc():string]() + var fields = initTable[string, string]() for key, v in c.dVal: - closureScope: - let key_closure = key - let val_closure = $$v.val - fields[key_closure] = proc(): string = - return val_closure + fields[key] = $$v.val var hastyscribe = newHastyScribe(options, fields) let file = t.getString() i.push hastyscribe.compileFragment(file, hs.dirs.contents).newVal
M hastysite.nimblehastysite.nimble

@@ -8,7 +8,12 @@ license = "MIT"

bin = @["hastysite"] # Deps -requires: "nim >= 1.4.0" +requires: "nim >= 1.4.4, zippy >= 0.5.6" + +before install: + exec "nimble install -y nifty" + exec "nifty remove -f" + exec "nifty install" # Tasks const
M site/templates/_footer.mustachesite/templates/_footer.mustache

@@ -1,5 +1,5 @@

<footer> -<p>&copy; 2016&mdash;2020 <a href="https://h3rald.com">Fabio Cevasco</a></p> +<p>&copy; 2016&mdash;2021 <a href="https://h3rald.com">Fabio Cevasco</a></p> <p>Powered by <a href="https://hastysite.h3rald.com">HastySite</a></p> <p> <a href="http://creativecommons.org/licenses/by-sa/4.0/">