Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude image or video from sitemap #63

Open
mynameisfreedom opened this issue Oct 30, 2024 · 2 comments
Open

Exclude image or video from sitemap #63

mynameisfreedom opened this issue Oct 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@mynameisfreedom
Copy link

mynameisfreedom commented Oct 30, 2024

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
Copy link
Owner

bnomei commented Oct 30, 2024

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?

@bnomei bnomei self-assigned this Oct 30, 2024
@bnomei bnomei added the enhancement New feature or request label Oct 30, 2024
@mynameisfreedom
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants