@@ 39,6 39,14 @@ main() {
cp -R src/css/. dst/css/.
+ # copy over the robots.txt file if there is one.
+ test -f src/robots.txt && cp src/robots.txt dst/robots.txt
+
+ # create a super-simple sitemap of all html files.
+ for file in dst/**/*.html; do
+ add_to_sitemap "$file"
+ done
+
echo "Generated $(find dst | wc -l) files"
}
@@ 121,6 129,10 @@ generate_rss_feed() {
echo "</channel></rss>"
}
+add_to_sitemap() {
+ echo "$1" | sed -e "s;dst;$(config_for base_url);" >> dst/sitemap.txt
+}
+
date_func() {
if [ "$(uname)" = "Darwin" ]; then
gdate || echo "Please 'brew install coreutils'" && exit 1