technoduck.me.old/scripts/md2html.sh

10 lines
230 B
Bash
Raw Normal View History

2023-07-18 19:59:11 +00:00
#!/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