diff options
| Commit | d792cfc4f2b6b53bf2174c3f3e3fea147524ede8 (patch) | |
|---|---|---|
| Author | 2025-08-17 17:50:03 +0300 | |
| Committer | 2025-08-17 17:50:03 +0300 | |
| Files | 3c9fba8f4c7e848df3c4a6f0d646b74190632b50 /generate.sh | |
| syndamia.com-d792cfc4f2b6b53bf2174c3f3e3fea147524ede8.tar syndamia.com-d792cfc4f2b6b53bf2174c3f3e3fea147524ede8.tar.gz syndamia.com-d792cfc4f2b6b53bf2174c3f3e3fea147524ede8.zip | ||
| Parent | 3b29d095293d5e015a491061c190a68f6ab4014b (diff) | |
feat!: Update dunbar version
The main difference is how the header and footer are handled. Before
they were inserted as "include_markup", but now they are as "include".
1 files changed, 15 insertions, 10 deletions
| -rwxr-xr-x | generate.sh | 25 |
diff --git a/generate.sh b/generate.sh index d2ba7f9..49096fa 100755 --- a/generate.sh +++ b/generate.sh @@ -1,8 +1,10 @@ #!/bin/bash -: ${SRC_DIR:=$PWD/src} +: ${SRC:=$PWD/src} +: ${HEADER:=$PWD/html/header.html} +: ${FOOTER:=$PWD/html/footer.html} : ${GEN_DIR:=./website} -: ${META_FILE:=meta.tsv} # Relative to SRC_DIR +: ${META_FILE:=meta.tsv} # Relative to SRC # 0 Fix hardlinks {{{ while read -r folder @@ -13,7 +15,7 @@ ln "$folder.du" "$folder/index.du" fi done << EOF -$(find "$SRC_DIR" -maxdepth 1 -type d) +$(find "$SRC" -maxdepth 1 -type d) EOF if [ ! "src/favicon.ico" -ef "src/img/favicon.ico" ] then @@ -24,22 +26,25 @@ EOF # }}} # 1. Dunbar source to HTML {{{ mkdir -p "$GEN_DIR" - cp -a "$SRC_DIR/." "$GEN_DIR" + cp -a "$SRC/." "$GEN_DIR" rm "$GEN_DIR/$META_FILE" "$GEN_DIR/."* - META="$SRC_DIR/$META_FILE" - export META GEN_DIR + META="$SRC/$META_FILE" + AWK="mawk" + export HEADER FOOTER META GEN_DIR AWK /usr/bin/env dash ./dunbar/dunbar_awk/dunbar.sh html \ - -o . \ - -e ./ext/meta.awk -e ./ext/attention.awk \ + -i \ + -e ./ext/attention.awk \ -e ./ext/heading-anchors.awk -e ./ext/pagenav.awk \ -e ./ext/icons.awk -e ./ext/presentation.awk \ - -e ./ext/contents.awk \ + -e ./ext/contents.awk -e ./ext/teaching.awk \ -wo \ - -he ./ext/header.du.html -fo ./ext/footer.du.html \ $(find "$GEN_DIR" -type f -name "*.du") # }}} +# 2. Meta handling {{{ + awk -f meta.awk $(find "$GEN_DIR" -type f -name "*.html") +# }}} # 2. Tiny version, strip away styles and other stuff {{{ # TODO # }}} |