summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2022-11-11 14:31:12 -0800
committerPreston Pan <preston@nullring.xyz>2022-11-11 14:31:12 -0800
commit0e5eccfb37fb8ce26c50064c2ddf04f893694207 (patch)
treee0bd78d7798d1bf37f11fb238318e03dd0ddc9cc /scripts
parentd1d3b99dd370c3d3674efd021225ba508f3dc064 (diff)
added rss feed to main page
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/addback.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/addback.sh b/scripts/addback.sh
new file mode 100755
index 0000000..481733f
--- /dev/null
+++ b/scripts/addback.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# A simple extension to add a back button to every page that needs one.
+
+PROJECT_ROOT="./build/website"
+if [ "$(realpath "$1")" = "$(realpath "$PROJECT_ROOT/index.html")" ]; then
+ printf ' '
+ exit 0
+fi
+
+#
+if [ "$(basename "$1")" = 'index.html' ];
+then
+ printf '<a href="\.\./index\.html">Back</a>'
+else
+ printf '<a href="\./index\.html">Back</a>'
+fi