Got rid of janky build.sh script. Now uses a bunch of janky scripts and a make file - because that is bound to be easier to maintain.
7 lines
339 B
Bash
Executable file
7 lines
339 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
find content/blog/ -type f -name '*.md' -not -name 'xxx-*' | while read file; do
|
|
sed -n '/---/,/---/p' "$file" | sed -n '1,/---/p' | sed '/^---$/d' | sed '/^$/,$d' | yq -r 'if ( .tags | type ) == "array" then .tags else [ .tags ] end | join("\n")' | while read tag; do
|
|
echo "$tag" | tr ' ' '_'
|
|
done
|
|
done | sort -u
|