Files
einundzwanzig-app/resources/views/vendor/feed/json.blade.php
HolgerHatGarKeineNode efe44cf344 Add storage configuration, localization updates, and feed generation
- Added `publicDisk` configuration to `filesystems.php`.
- Expanded locale translations in `es.json` and `de.json`.
- Implemented RSS, Atom, and JSON feed views.
- Added `feed.php` configuration for feed generation.
- Introduced `ImageController` for image handling.
- Updated application routing to include `api.php`.
2025-11-21 16:23:55 +01:00

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
]
}