Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Override created sitemap #20

Closed
marcodarko opened this issue Apr 23, 2021 · 2 comments
Closed

Override created sitemap #20

marcodarko opened this issue Apr 23, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@marcodarko
Copy link

Docs mention to run npm run sitemap to inspect the output and this follows the config, but when the sitemap already exists is there a way to override it programmatically ? When I run the same command it doesn't seem to change the output rather ignores it.
My use case is that I need to generate/update this sitemap daily and need to override it.

@cheap-glitch
Copy link
Owner

Indeed, the file should be overridden. I haven't tested it but this line is probably the culprit:

if (!fs.existsSync(output)) {

As a workaround, maybe you could add a npm script that would run the following commands:

rm -f path/to/your/sitemap.xml && vue-cli-service sitemap

@cheap-glitch cheap-glitch added the bug Something isn't working label Apr 26, 2021
@marcodarko
Copy link
Author

Thanks for responding to my issue! I'll keep an eye out for this fix, in the meantime I'll take your advice and remove it that way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants