"alecthomas",
"chromahtml",
"definitionlist",
+ "divs",
"errbuf",
"Furqan",
"goldmark",
"newext",
"oldext",
"outbuf",
+ "pandoc",
"PUBDIR",
"sabhiram",
"sirupsen",
zs serve
```
-For a starter template see the [zs-starter-tempate](https://git.mills.io/prologic/zs-stater-template) which can also be found running live at [zs.mills.io](https://zs.mills.io).
+For a starter template see the [zs-starter-template](https://git.mills.io/prologic/zs-stater-template) which can also be found running live at [zs.mills.io](https://zs.mills.io).
## Features
done | sort -r -n | cut -d' ' -f2-
```
+Looking for more plugins? Check out the [contrib/plugins](https://git.mills.io/prologic/zs/src/branch/main/contrib/plugins) collection!
+
## Hooks
There are two special plugin names that are executed every time the build
minify -o "$ZS_OUTDIR/css/site.min.css" "$ZS_OUTDIR/css/site.css"
```
+Looking for more hooks? Check out the [contrib/hooks](https://git.mills.io/prologic/zs/src/branch/main/contrib/hooks) collection!
+
## Command line usage
- `zs build` re-builds your site.
Use "zs [command] --help" for more information about a command.
```
+## Who's using zs?
+
+Here's a few sites that use `zs` today:
+
+- https://yarn.social -- Landing page of the decentralized microBlogging ecosystem.
+- https://salty.im -- Landing page of the e2e encrypted IndieWeb inspired messaging protocol.
+- https://zs.mills.io -- zs starter template demo.
+- https://prologic.shortcircuit.net.au -- Home page of James Mills / prologic (author of zs)
+
+Want to add your site here? File an issue or submit a pull-request!
+
## Frequently Asked Questions
### How do I link to other pages?
--- /dev/null
+#!/bin/sh
+
+set -e
+
+minify_assets() {
+ p="$1"
+ t="$2"
+
+ find "$p" -type f -name "*.$t" | while read -r file; do
+ name="${file#"$p"}"
+ name="${name#"/"}"
+ #name="${name%.*}"
+ #minify -o "${p}/${name}.min.$t" "$file"
+ minify -o "${p}/${name}" "$file"
+ done
+}
+
+minify_assets "$ZS_OUTDIR" "css"
+minify_assets "$ZS_OUTDIR" "js"
--- /dev/null
+#!/bin/sh
+
+exit 0
--- /dev/null
+#!/bin/bash
+
+if [ $# -ne 1 ]; then
+ printf "Usage: %s <path>\n" "$(basename "$0")"
+ exit 1
+fi
+
+modpath="$1"
+modpath="${modpath%"/"}"
+
+ext=".js"
+if [ -n "$ZS_PRODUCTION" ]; then
+ ext=".min.js"
+fi
+
+echo "<script type=\"importmap\">"
+{
+ find "$modpath" -type f -name '*.js' | while read -r file; do
+ name="${file#"$modpath"}"
+ name="${name#"/"}"
+ name="${name%.*}"
+ echo "${name}=./${modpath}/${name}${ext}"
+ done
+} | jq -Rs '{ imports: split("\n") | [.[] | capture("^(?<name>[^=]+)=(?<src>.*)$") | {(.name): .src}] | add }'
+echo "</script>"
--- /dev/null
+#!/bin/sh
+
+if [ ! $# = 1 ]; then
+ printf "Usage: %s <file>\n" "$(basename "$0")"
+ exit 0
+fi
+
+if [ -f "$1" ]; then
+ cat "$1"
+else
+ echo "error: file not found $1"
+fi
--- /dev/null
+#!/bin/sh
+
+set -e
+
+SCRIPTS="page"
+MODULES="globe phenon"
+
+# Load live.js for non-production builds for faster development
+if [ -z "$ZS_PRODUCTION" ]; then
+ SCRIPTS="$SCRIPTS live"
+fi
+
+for script in $SCRIPTS; do
+ printf "<script type=\"application/javascript\" src=\"/js/%s.js\"></script>\n" "$script"
+done
+
+for module in $MODULES; do
+ printf "<script type=\"module\" src=\"/js/modules/%s.js\"></script>\n" "$module"
+done
+
+printf "<script defer type=\"module\" src=\"/js/main.js\">main();</script>\n"
--- /dev/null
+#!/bin/sh
+
+set -e
+
+CSS="style triangles"
+
+for css in $CSS; do
+ printf "<link rel=\"stylesheet\" href=\"/css/%s.css\">\n" "$css"
+done