aboutsummaryrefslogtreecommitdiff
path: root/src/make_index.md.sh
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 10:15:57 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2024-10-24 10:15:57 -0500
commitad0bbbc109ae8aeb7559cdbecf3c66b900f7e885 (patch)
tree6cd0b37563338a6a9366cb0e2b80df6031627736 /src/make_index.md.sh
parent56ef5d80e70e8301e150317d57428c87514c01bd (diff)
initial commit
Diffstat (limited to 'src/make_index.md.sh')
-rwxr-xr-xsrc/make_index.md.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/make_index.md.sh b/src/make_index.md.sh
new file mode 100755
index 0000000..544b90c
--- /dev/null
+++ b/src/make_index.md.sh
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+links="---
+title: All Stories
+---
+
+"
+
+for i in md/*.md; do
+ title=$(grep '^title:' $i | tr -d '"' | sed -E 's/^title: (.*)$/\1/')
+
+ no_ext=$(basename "${i%.*}")
+ link="- [$title](/stories/${no_ext}.html)
+"
+
+ links+="$link"
+done
+
+echo "$links"