~bpv/sbs

aa520ed5239e1f5969b5e39099e7b69320df1975 — Bryce Vandegrift 5 months ago a68d003
Corrected RSS formatting
1 files changed, 1 insertions(+), 1 deletions(-)

M sbs
M sbs => sbs +1 -1
@@ 52,7 52,7 @@ publish() {
	tmp_dir=$(mktemp -d)
	mkdir $blog_dir/$dir_name
	printf "<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\">\n<head>\n<meta charset=\"utf-8\">\n<link rel=\"icon\" href='%s' type=\"image/x-icon\">\n<link rel=\"stylesheet\" href='%s'>\n<title>%s</title>\n</head>\n<body>\n%s\n</body>\n</html>" "$html_icon_path" "$html_css_path" "$title" "$contents" > $blog_dir/$dir_name/$dir_name.html
	printf "\n<item>\n<title>%s</title>\n<guid>%s</guid>\n<link>%s</link>\n<pubDate>%s</pubDate>\n<description>\n%s\n</description>\n</item>\n" "$title" "$url" "$url" "$date" "$contents" > $tmp_dir/rss.xml
	printf "\n<item>\n<title>%s</title>\n<guid>%s</guid>\n<link>%s</link>\n<pubDate>%s</pubDate>\n<description>\n<![CDATA[\n%s\n]]>\n</description>\n</item>\n" "$title" "$url" "$url" "$date" "$contents" > $tmp_dir/rss.xml
	printf "\n<li>%s - <a href='%s'>%s</a></li>\n" "$(date '+%b %d, %Y')" "$url" "$title" > $tmp_dir/preview.html
	sed -i "/<!-- SB -->/r $tmp_dir/rss.xml" $rssindex
	sed -i "/<!-- SB -->/r $tmp_dir/preview.html" $blogindex