1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-03-14 19:59:38 +01:00

Merge pull request #360 from olekristoffer/dev

Links and formatting used in RSS/Atom feeds
This commit is contained in:
Kevin Woblick 2022-01-28 15:09:24 +01:00 committed by GitHub
commit c55113daed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,19 +1,20 @@
<?= '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ $meta['title'] }}</title>
<link href="{{ $meta['link'] }}"/>
<link rel="self" type="application/atom+xml" href="{{ $meta['link'] }}"/>
<updated>{{ $meta['updated'] }}</updated>
<id>{{ $meta['id'] }}</id>
@foreach($links as $link)
<entry>
<id>{{ $link->url }}</id>
<title><![CDATA[{{ $link->title }}]]></title>
<link rel="alternate" href="{{ route('links.show', ['link'=> $link]) }}" />
<id>{{ route('links.show', ['link'=> $link]) }}</id>
<title type="text"><![CDATA[{{ strip_tags($link->title) }}]]></title>
<link rel="alternate" href="{{ $link->url }}" />
<link rel="via" type="application/atom+xml" href="{{ route('links.show', ['link'=> $link]) }}"/>
<author>
<name> <![CDATA[{{ $link->user->name }}]]></name>
</author>
<summary type="html">
<![CDATA[{!! $link->markdownDescription !!}]]>
<summary type="text">
<![CDATA[{!! strip_tags($link->description) !!}]]>
</summary>
<updated>{{ $link->updated_at->toRfc3339String() }}</updated>
</entry>