Skip to content

Commit 112e41c

Browse files
committed
📝 improved readme
1 parent 95f8243 commit 112e41c

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,21 @@ If you use these defaults you need to provide the fields `date (type: date)` and
126126
```php
127127
[
128128
'urlfield' => 'url',
129-
'titlefield' => 'title',
130-
'textfield' => 'text',
131129
'modified' => time(),
132130
'snippet' => 'feed/sitemap'
133131
'mime' => null,
134132
'sort' => true,
133+
'images' => false,
134+
'imagesfield' => 'images',
135+
'imagetitlefield' => 'title',
136+
'imagecaptionfield' => 'caption',
137+
'imagelicensefield' => 'license',
138+
'videos' => false,
139+
'videosfield' => 'videos',
140+
'videotitlefield' => 'title',
141+
'videothumbnailfield' => 'thumbnail',
142+
'videodescriptionfield' => 'description',
143+
'videourlfield' => 'url',
135144
]
136145
```
137146

@@ -162,7 +171,9 @@ return [
162171
see [Kirby Docs -Filtering compendium](https://getkirby.com/docs/cookbook/content/filtering)
163172

164173
```php
165-
$feed = site()->index()->listed()->filterBy('template', '!=', 'excludeme')->limit(50000)->sitemap($options);
174+
$feed = site()->index()->listed()
175+
->filterBy('template', '!=', 'excludeme')
176+
->limit(50000)->sitemap($options);
166177
```
167178

168179

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bnomei/kirby3-feed",
33
"type": "kirby-plugin",
4-
"version": "1.4.0",
4+
"version": "1.4.1",
55
"description": "Generate a RSS/JSON/Sitemap-Feed from a Pages-Collection",
66
"license": "MIT",
77
"authors": [

snippets/feed/sitemap.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
>
77
<?php foreach($items as $item): ?>
88
<url>
9-
<loc><?= $item->url() ?></loc>
9+
<loc><?= $item->{$urlfield}() ?></loc>
1010
<?php foreach(kirby()->languages() as $lang): ?>
1111
<xhtml:link
1212
rel="alternate"
1313
hreflang="<?= $lang->code() ?>"
14-
href="<?= $item->url($lang->code()) ?>"/>
15-
<?php if($lang->isDefault()): ?><link rel="alternate" href="<?= $item->url() ?>" hreflang="x-default" /><?php endif; ?>
14+
href="<?= $item->{$urlfield}($lang->code()) ?>"/>
15+
<?php if($lang->isDefault()): ?><link rel="alternate" href="<?= $item->{$urlfield}() ?>" hreflang="x-default" /><?php endif; ?>
1616
<?php endforeach; ?>
1717
<lastmod><?= $modified ?></lastmod>
1818
<?php if($images): ?>

0 commit comments

Comments
 (0)