#!/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" # add comments link sed -Ei 's/()(.*)(<\/span>)/\1\2 | Comments<\/a>\3/' "$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/\h\i\@\y\p\e\i\.\m\e/' site/index.html