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

Fetching collections with data files #14

Open
WebShapedBiz opened this issue Jan 12, 2021 · 3 comments
Open

Fetching collections with data files #14

WebShapedBiz opened this issue Jan 12, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@WebShapedBiz
Copy link

Hi,
I'm API fetching three collections using three different data files. When I try {% sitemap datafile %} I'm getting an error EmptySitemap: You ended the stream without writing anything.

Is there a way to use your plugin with such configuration, where collections are not coming from folders nor as custom collections defined in .eleventy.js?

Cheers.

@nunof07
Copy link
Member

nunof07 commented Jan 15, 2021

Hi @WebShapedBiz ,

I've just pushed an example that works with data files and a small fix so that items without the data bag don't break.

Have a look at it and let me know if it helps your case.

Cheers.

@WebShapedBiz
Copy link
Author

Thank you @nunof07 for your time and effort, but I was pressed with time and moved on, making my own ad-hoc solution. It would be nice though if one could pass all the data files for which there should be a sitemap, something like {% sitemap file1, subfolder.file2 %} and end up with a sitemap like this.

Cheers.

@nunof07 nunof07 added enhancement New feature or request and removed enhancement New feature or request labels Jan 15, 2021
@nunof07
Copy link
Member

nunof07 commented Jan 15, 2021

That's not a bad idea, adding support for sitemap indexes, although it would require a lot of changes to the current plugin and it's out of my plans for the moment.

@nunof07 nunof07 added the enhancement New feature or request label Mar 30, 2021
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