mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
{
|
|
"version": "https://jsonfeed.org/version/1.1",
|
|
"title": "{{ $meta['title'] }}",
|
|
@if(!empty($meta['description']))
|
|
"description": "{{ $meta['description'] }}",
|
|
@endif
|
|
"home_page_url": "{{ config('app.url') }}",
|
|
"feed_url": "{{ url($meta['link']) }}",
|
|
"language": "{{ $meta['language'] }}",
|
|
@if(!empty($meta['image']))
|
|
"icon": "{{ $meta['image'] }}",
|
|
@endif
|
|
"authors": [@foreach($items->unique('authorName') as $item){
|
|
"name": "{{ $item->authorName }}"
|
|
}@if(! $loop->last),@endif
|
|
@endforeach
|
|
|
|
],
|
|
"items": [@foreach($items as $item){
|
|
"id": "{{ url($item->id) }}",
|
|
"title": {!! json_encode($item->title) !!},
|
|
"url": "{{ url($item->link) }}",
|
|
"content_html": {!! json_encode($item->summary) !!},
|
|
"summary": {!! json_encode($item->summary) !!},
|
|
"date_published": "{{ $item->timestamp() }}",
|
|
"date_modified": "{{ $item->timestamp() }}",
|
|
"authors": [{ "name": {!! json_encode($item->authorName) !!} }],
|
|
@if($item->__isset('image'))
|
|
"image": "{{ url($item->image) }}",
|
|
@endif
|
|
@if($item->__isset('enclosure'))
|
|
"attachments": [
|
|
{
|
|
"url": "{{ url($item->enclosure) }}",
|
|
"mime_type": "{{ $item->enclosureType }}",
|
|
"size_in_bytes": {{ $item->enclosureLength }}
|
|
}
|
|
],
|
|
@endif
|
|
"tags": [ {!! implode(',', array_map(fn($c) => '"'.$c.'"', $item->category)) !!} ]
|
|
}@if(! $loop->last),
|
|
@endif
|
|
@endforeach
|
|
|
|
]
|
|
}
|