diff options
Diffstat (limited to 'post-process.sh')
-rwxr-xr-x | post-process.sh | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/post-process.sh b/post-process.sh index 1056d7d..81a216b 100755 --- a/post-process.sh +++ b/post-process.sh @@ -1,19 +1,20 @@ -# This file is released into the public domain. - #!/bin/bash +# This file is released into the public domain. # 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 +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 class="subtitle">)(.*)(<\/span>)/\1\2 | <a href="#isso-thread">Comments<\/a>\3/' "$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 +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. |