+ cat $blog_template | sub "$to_publish" > "$data_dir/html/$to_publish.html"
+
+ # make this part less horrendous
+ temp_index="$(mktemp)"
+ cat "$data_dir/templates/$index_template" | sub "$to_publish" >> $temp_index
+ temp_rolling="$(mktemp)"
+ cat "$data_dir/templates/$rolling_template" | sub "$to_publish" >> $temp_rolling
+ temp_rss="$(mktemp)"
+ cat "$data_dir/templates/$rss_template" | sub "$to_publish" >> $temp_rss