Mercurial > hg > chronicle
changeset 152:89eef19064e8
Updated to add titles to our RSS feeds.
author | Steve Kemp <steve@steve.org.uk> |
---|---|
date | Thu, 03 Jan 2008 09:30:22 +0000 |
parents | 0dc1ede3cd09 |
children | 3f0bf6fe2825 |
files | bin/chronicle themes/xml/index.xml.template themes/xml/month.xml.template themes/xml/tags.xml.template |
diffstat | 4 files changed, 12 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/chronicle Tue Jan 01 22:22:49 2008 +0000 +++ b/bin/chronicle Thu Jan 03 09:30:22 2008 +0000 @@ -901,6 +901,10 @@ # $template = loadTemplate( "index.xml.template", die_on_bad_params => 0 ); + $template->param( blog_title => $CONFIG{'blog_title'} ) + if ( $CONFIG{'blog_title'} ); + $template->param( blog_subtitle => $CONFIG{'blog_subtitle'} ) + if ( $CONFIG{'blog_subtitle'} ); $template->param( entries => $entries ) if ( $entries ); outputTemplate( $template, "index.rss" ); } @@ -995,6 +999,8 @@ # Now output the .xml file # $template = loadTemplate( "tags.xml.template", die_on_bad_params => 0 ); + $template->param( blog_title => $CONFIG{'blog_title'} ) + if ( $CONFIG{'blog_title'} ); $template->param( entries => $entries ) if ( $entries ); $template->param( tagname => $tagName ) if ( $tagName ); outputTemplate( $template, "$dir/$tagName.rss" ); @@ -1126,6 +1132,8 @@ # Now the RSS page. # $template = loadTemplate( "month.xml.template", die_on_bad_params => 0 ); + $template->param( blog_title => $CONFIG{'blog_title'} ) + if ( $CONFIG{'blog_title'} ); $template->param( entries => $entries ) if ( $entries ); $template->param( month => $month, year => $year ); $template->param( month_name => $names[$month - 1 ] );
--- a/themes/xml/index.xml.template Tue Jan 01 22:22:49 2008 +0000 +++ b/themes/xml/index.xml.template Thu Jan 03 09:30:22 2008 +0000 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'> <channel> - <title>Blog Entries</title> - <description>Blog Entries</description> + <title><!-- tmpl_var name='blog_title' --></title> + <description><!-- tmpl_var name='blog_subtitle' --></description> <link><!-- tmpl_var name='top' --></link> <!-- tmpl_loop name="entries" -->
--- a/themes/xml/month.xml.template Tue Jan 01 22:22:49 2008 +0000 +++ b/themes/xml/month.xml.template Thu Jan 03 09:30:22 2008 +0000 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="ISO-8859-1"?> <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'> <channel> - <title>Entries from <!-- tmpl_var name='month_name' --> <!-- tmpl_var name='year' --></title> + <title><!-- tmpl_var name='blog_title' --> - Entries from <!-- tmpl_var name='month_name' --> <!-- tmpl_var name='year' --></title> <description>Entries from <!-- tmpl_var name='month_name' --> <!-- tmpl_var name='year' --></description> <link><!-- tmpl_var name='top' --></link>
--- a/themes/xml/tags.xml.template Tue Jan 01 22:22:49 2008 +0000 +++ b/themes/xml/tags.xml.template Thu Jan 03 09:30:22 2008 +0000 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/'> <channel> - <title>Entries tagged <!-- tmpl_var name='tagname' escape='html' --></title> + <title><!-- tmpl_var name='blog_title' --> - Entries tagged <!-- tmpl_var name='tagname' escape='html' --></title> <description>Entries tagged <!-- tmpl_var name='tagname' escape='html' --></description> <link><!-- tmpl_var name='top' --></link>