aboutsummaryrefslogtreecommitdiff
path: root/scripts/posts
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-04-01 12:47:12 +0200
committerlonkaars <l.leblansch@gmail.com>2021-04-01 12:47:12 +0200
commit5a9da62ded70cfb05309aebcb1c1ee09d17948c5 (patch)
tree0ddbdff0a75279bd6d4dae48fe83510cb5e32108 /scripts/posts
parent71ab18ec4264197aae27efe64e4565c4989a19cd (diff)
added scripts for post meta json things
Diffstat (limited to 'scripts/posts')
-rwxr-xr-xscripts/posts16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/posts b/scripts/posts
new file mode 100755
index 0000000..12900e1
--- /dev/null
+++ b/scripts/posts
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+postsmeta=$( find ../posts \
+ -name "*.md" \
+ -type f \
+ -exec ./postinfo {} \; |\
+ jq -s '.')
+
+jq -n \
+ --argjson valid_tags "$(./tags)" \
+ --argjson posts "$postsmeta" \
+'{
+ "valid_tags": $valid_tags,
+ "posts": $posts
+}'
+