aboutsummaryrefslogtreecommitdiff
path: root/post-process.sh
blob: e3477d44f6c856b04df9ccfd54030f6d279016f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# This file is released into the public domain.

# clean up generated sitemap files.
rm pages/{micro,}blog.org

for post in site/posts/*.html; do
    # fix absolute links mislabelled as file:// links
    sed -i 's/src="file:\/\//src="/g' "$post"
    sed -i 's/href="file:\/\//href="/g' "$post"
done

for page in site/*.html; do
    sed -i 's/src="file:\/\//src="/g' "$page"
    sed -i 's/href="file:\/\//href="/g' "$page"
done

# fix email address.
sed -i 's/xU)U1M2fEQL6bfYGpwSG/\i\d\@\y\p\e\i\.\o\r\g/' site/index.html