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

Support sitemap creation when using generate payload #68

Closed
Jered opened this issue Jun 14, 2019 — with CMTY · 4 comments

Comments

Copy link

commented Jun 14, 2019 — with CMTY

What problem does this feature solve?

When using generate with dynamic routes you return the routes as an array of string URLs which the sitemap module picks up and creates a correct sitemap.xml. However, if you return the routes object from generate to use the payload feature, the sitemap will fail because it expects a string instead of an object.

What does the proposed changes look like?

Make it so sitemap can use generate.routes when using payloads. Should be updated to also accept routes in the form of:

[
  {
    route: 'urlstring', 
    payload: {data object},
    ...
  }
]

and extract the route.

This feature request is available on Nuxt community (#c52)

@cmty cmty bot added the cmty:feature-request label Jun 14, 2019

@NicoPennec

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

Hi @Jered
Thanks for your request 👍

Can you create and share a simple Nuxt project to reproduce the payload issue, please?
This will help to test a fix.

@NicoPennec

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

Issue fixed on release v1.3.1

@Jered

This comment has been minimized.

Copy link
Author

commented Sep 17, 2019

Thanks for the fix! Sorry, I have been busy and haven't been able to create a test. I'll test on our project.

@NicoPennec

This comment has been minimized.

Copy link
Member

commented Sep 17, 2019

Thanks. Let me know if you have any bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.