aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Gonçalves <me@rgoncalves.se>2021-09-20 09:46:44 +0200
committerRomain Gonçalves <me@rgoncalves.se>2021-09-20 09:46:44 +0200
commit362b71c855c434f246e4bb366cb26d02a9832c75 (patch)
tree3bee15b84f0620544ccbf0e2837d446c9743f04a
parent459a48f299c188bbfc024fe14657e3d4802a0b6b (diff)
downloadwebsite-362b71c855c434f246e4bb366cb26d02a9832c75.tar.gz
bin: Add template support and empty template
-rwxr-xr-xbin/ssg4
-rw-r--r--templates/none.html9
2 files changed, 12 insertions, 1 deletions
diff --git a/bin/ssg b/bin/ssg
index f70a3f9..28eeea0 100755
--- a/bin/ssg
+++ b/bin/ssg
@@ -91,7 +91,9 @@ main() {
fi
# Concatenate temporary files to final page
- m4 templates/default.html > "${TMP_FILE}"
+ template=$(_get_value "${file}" "template")
+ template="${template:-default}"
+ m4 "templates/${template}.html" > "${TMP_FILE}"
install -D "${TMP_FILE}" "${out_path}"
done
diff --git a/templates/none.html b/templates/none.html
new file mode 100644
index 0000000..f75fb33
--- /dev/null
+++ b/templates/none.html
@@ -0,0 +1,9 @@
+<html>
+include(templates/head.html)
+<body>
+ sinclude(tmp/metadata.html)
+ sinclude(tmp/toc.html)
+ include(tmp/body.html)
+ sinclude(tmp/index.html)
+<body>
+</html>
remember that computers suck.