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

#!/bin/bash

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

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

for page in $(ls site); do
    sed -i 's/src="file:\/\//src="/g' site/$page
    sed -i 's/href="file:\/\//href="/g' site/$page
done

# fix email address.
sed -i 's/xU)U1M2fEQL6bfYGpwSG/\h\i\@\y\p\e\i\.\m\e/' site/index.html