technoduck.me.old/scripts/md2html.sh
2023-07-18 15:59:11 -04:00

10 lines
No EOL
230 B
Bash
Executable file

#!/bin/sh
for f in pages/*.md feeds/pages/*.md; do
h="${f%%.md}.html"
lowdown -s "$f" > "$h"
# make URLs absolute.
o="output/$(basename "$f")"
sed -E 's@\]\([\/]?([^:\)]+)\)@](https://technoduck.me/\1)@g' < "$f" > "$o"
done