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

routes var in generate section will auto generate sitemap content #102

Closed
sandalwoodsh opened this issue Feb 15, 2020 · 3 comments
Closed

Comments

@sandalwoodsh
Copy link

sandalwoodsh commented Feb 15, 2020

If routes are not defined here:
sitemap: {
path: "/sitemap.xml",
hostname: "https://example.com"
}

AND a variable "routes" is found in the generate section, then the routes will be added automatically to the sitemap file.

generate: {
routes: function() {
return axios
.get(“blahblahblah”)
.then(res => {
const routes = [];
[…]

      return routes;
    });
}

}

This question is available on Nuxt community (#c78)
@ghost ghost closed this as completed Feb 15, 2020
@ghost ghost added the cmty:question label Feb 15, 2020
@ghost
Copy link

ghost commented Feb 15, 2020

This issue as been imported as question since it does not respect sitemap-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/sitemap-module/issues/c78.

@NicoPennec
Copy link
Member

yes, it's a feature as explain in the doc

routes (optional) - array | function

Default: [] or generate.routes value from your nuxt.config.js

@sandalwoodsh
Copy link
Author

sandalwoodsh commented Feb 21, 2020 via email

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants