- sed -i "/<!-- BLOG START -->/ a\
- `cat "$data_dir/templates/$index_entry_template" | sub "$to_publish"`" "$blog_index_file"
- #also clean up this bracket mess ^
+ sed -i "/$start_token/ a\
+ <!-- ID:$to_publish START -->\n`cat "$data_dir/templates/$index_template" | sub "$to_publish"`\n<!-- ID:$to_publish END -->" "$blog_index_file"
+
+ sed -i "/$start_token/ a\
+ <!-- ID:$to_publish START -->\n`cat "$data_dir/templates/$rolling_template" | sub "$to_publish"`\n<!-- ID:$to_publish END -->" "$rolling_file"