<?xml version='1.0' encoding='{$config.charset}'?>
<rss version='2.0'>
	<channel>
        {if isset($SECTION)}
			<title>{$SECTION.name} - {$config.website_name}</title>
			<link>{$SITE_URL}{$SECTION.url}</link>
			<description>{$SECTION.description|default:"`$config.website_name` delivers the latest interesting news and articles on the latest technology, entertainment, automotive, and more."}</description>
        {else}
			<title>{$config.website_name}</title>
			<link>{$SITE_URL}/</link>
			<description>{$config.website_name} delivers the latest interesting news and articles on the latest technology, entertainment, automotive, and more.</description>
        {/if}
		<lastBuildDate>{$smarty.now|format_time}</lastBuildDate>
        {fetch_articles assign=articles perPage=10 section=$SECTION.sectionId|default:'' fields="title, sectionId, url, publishedOn, summary, content" sectionInfo=true}
        {foreach from=$articles item=article}
			<item>
				<guid isPermaLink="true">{$SITE_URL}{$article.url}</guid>
				<link>{$SITE_URL}{$article.url}</link>
				<pubDate>{$article.publishedOn|date_format}</pubDate>
				<title>{$article.title}</title>
				<description>{$article.summary|default:$article.content|truncate:350}</description>
				<category domain="{$SITE_URL}{$article.section.url}">{$article.section.name}</category>
			</item>
        {/foreach}
	</channel>
</rss>