aboutsummaryrefslogtreecommitdiff
path: root/src/gen/gen_index.sh
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 19:50:15 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 19:50:15 -0500
commit015932a62e400e7d595777b6b29f64e60ae12943 (patch)
treefe079726bcf33ba5f7430d6d96ac7e42644d9197 /src/gen/gen_index.sh
parentf824bbcca25b4caaef8023cf36efaaed37e7257f (diff)
changes
Diffstat (limited to 'src/gen/gen_index.sh')
-rwxr-xr-xsrc/gen/gen_index.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gen/gen_index.sh b/src/gen/gen_index.sh
new file mode 100755
index 0000000..516f594
--- /dev/null
+++ b/src/gen/gen_index.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env bash
+
+file="---\ntitle: All Stories\n---\n"
+
+for i in md/*.md; do
+ title=$(sed -nE 's/^title: "?(.*)("?)$/\1/p' "$i")
+ no_ext=$(basename "$i" .md)
+ file+="\n- [$title](/stories/${no_ext}.html)"
+done
+
+echo -e "$file"