<commit_before><?php ///////////////////////////////////////////////////////
// ----------------------------------------------------------
// FEED TEMPLATE
// ----------------------------------------------------------
/////////////////////////////////////////////////////////////

// Do not wrap images in Kirbytext in figure elements
// $kirby->set('option', 'kirbytext.image.figure', true);

// Reset class(es) set on imageset figure (wrapper)
$kirby->set('option', 'imageset.tags.image.class', '');

// Generate plain markup for imagesets
imageset::outputStyle('plain');

// Overrule imageset presets for rss feed
imageset::presets([
	'default' => '300-1600,3',
	'1of2'    => '300-1600,3',
	'1of3'    => '300-1600,3',
]);

////////////////////////////////////////////////////////// ?>

<!-- generator="<?php echo $generator ?>" -->
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><?php echo xml($title); ?></title>
		<link><?php echo url($channel); ?></link>
		<generator><?php echo c::get('feed.generator', 'Kirby'); ?></generator>
		<lastBuildDate><?php echo date('r', $modified) ?></lastBuildDate>
		<?php /* <lastBuildDate><?php echo $site->find($channel)->modified('r'); ?></lastBuildDate> */ ?>
		<atom:link href="<?php echo url($channel); ?>.rss" rel="self" type="application/rss+xml" />

		<?php if(!empty($description)): ?>
			<description><?php echo xml($description); ?></description>
		<?php endif; ?>

		<?php foreach($items as $item): ?>
			<item>
				<title><?php echo xml($item->title()); ?></title>
				<link><?php echo xml($item->url()); ?></link>
				<guid><?php echo xml($item->id()); ?></guid>
				<pubDate><?php echo $datefield == 'modified' ? $item->modified('r') : $item->date('r', $datefield); ?></pubDate>
				<?php if($excerpt == true): ?><commit_msg>Update (rss) feed template to alos work with PHP's `strftime()` out of the box.<commit_after><?php ///////////////////////////////////////////////////////
// ----------------------------------------------------------
// FEED TEMPLATE
// ----------------------------------------------------------
/////////////////////////////////////////////////////////////

// Set date format
$date_format = (c::get('date.handler') == 'strftime') ? '%a, %d %b %Y %H:%M:%S %z' : 'r';

// Reset class(es) set on imageset figure (wrapper)
$kirby->set('option', 'imageset.tags.image.class', '');

// Generate plain markup for imagesets
imageset::outputStyle('plain');

// Overrule imageset presets for rss feed
imageset::presets([
	'default' => '300-1600,3',
	'1of2'    => '300-1600,3',
	'1of3'    => '300-1600,3',
]);

////////////////////////////////////////////////////////// ?>

<!-- generator="<?php echo $generator ?>" -->
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><?php echo xml($title); ?></title>
		<link><?php echo url($channel); ?></link>
		<generator><?php echo c::get('feed.generator', 'Kirby'); ?></generator>
		<lastBuildDate><?php echo date('r', $modified) ?></lastBuildDate>
		<?php /* <lastBuildDate><?php echo $site->find($channel)->modified('r'); ?></lastBuildDate> */ ?>
		<atom:link href="<?php echo url($channel); ?>.rss" rel="self" type="application/rss+xml" />

		<?php if(!empty($description)): ?>
			<description><?php echo xml($description); ?></description>
		<?php endif; ?>

		<?php foreach($items as $item): ?>
			<item>
				<title><?php echo xml($item->title()); ?></title>
				<link><?php echo xml($item->url()); ?></link>
				<guid><?php echo xml($item->id()); ?></guid>
				<pubDate><?php echo $datefield == 'modified' ? $item->modified($date_format) : $item->date($date_format, $datefield); ?></pubDate>

				<?php if($excerpt == true): ?>
{'fraction_non_alphanumeric': 0.3593516209476309, 'fraction_numerical': 0.01945137157107232, 'mean_word_length': 2.3762626262626263, 'pattern_counts': {'":': 0, '<': 89, '<?xml version=': 0, '>': 112, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 20}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '338161', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1223, 'n_words': 252}