la_bloger/resources/views/themes/default/feed.blade.php

27 lines
1.1 KiB
PHP

<?php echo '<?xml version="1.0" encoding="UTF-8"?>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ e($channel->name) }}</title>
<link>{{ url('/') }}</link>
<description>{{ e($channel->meta_description ?? $channel->name) }}</description>
<language>{{ $channel->locale }}</language>
<lastBuildDate>{{ now()->toRfc822String() }}</lastBuildDate>
<atom:link href="{{ url('feed.xml') }}" rel="self" type="application/rss+xml"/>
@foreach($publications as $t)
<item>
<title>{{ e($t->title) }}</title>
<link>{{ url($t->url) }}</link>
<guid isPermaLink="true">{{ url($t->url) }}</guid>
<pubDate>{{ $t->published_at->toRfc822String() }}</pubDate>
@if($t->meta_description)
<description>{{ e($t->meta_description) }}</description>
@endif
@if($t->post->author)
<author>{{ e($t->post->author->email ?? $t->post->author->name) }}</author>
@endif
</item>
@endforeach
</channel>
</rss>