bnomei / kirby3-feed

Generate a RSS/JSON-Feed and Sitemap from a Pages-Collection.
https://forum.getkirby.com/t/kirby3-feed-rss-json-sitemap/23574
MIT License
64 stars 8 forks source link

Exclude image or video from sitemap #63

Open mynameisfreedom opened 3 weeks ago

mynameisfreedom commented 3 weeks ago

Hi @bnomei!

As always your plugin is great, thank you for that 🙏

But I have one "issue".

I created a toggle field in templates, so I can exclude a page (and desirable images/videos too) from the sitemap, and my $feed looks like this:

$feed = site()->index()->published()->filterBy('sitemap', '!=', 'false')->limit(50000)->sitemap($options);

And this works great for pages.

Is there maybe a way to exclude images or videos from the sitemap, with the toggle field added to file templates?

bnomei commented 3 weeks ago

currently the options for images and videos are global and take effect on every page in the collection. do i understand you correclty that you would like to have control over these as on a per page basis?

mynameisfreedom commented 3 weeks ago

Hi @bnomei thank you for your fast response.

Well yes, I wanted to introduce some way for users to be able to exclude files from the sitemap, if they click on the toggle field in the file options in the panel. There are numerous situations why someone would like to exclude a specific file.

The toggle for the pages I showed in the main post works great.