iamvishnusankar / next-sitemap

Sitemap generator for next.js. Generate sitemap(s) and robots.txt for all static/pre-rendered/dynamic/server-side pages.
https://next-sitemap.iamvishnusankar.com
MIT License
3.17k stars 120 forks source link

Please explain how I can use this library #830

Open themataleao opened 2 weeks ago

themataleao commented 2 weeks ago

Is your feature request related to a problem? Please describe. The documentation is lacking quite a few open questions to me. How can I use this library? When do I run the postscript command? What's the best practice? Do I put it in my CICD pipeline? How can I test the command locally? What the expected output?

Describe the solution you'd like I want a clear description of how this library can be executed and what is the expected outcome.

Describe alternatives you've considered I have considered writing the sitemap by myself.

Additional context Currently I am running pnpm run build and it creates basically an empty sitemap:

` sitemap.xml <?xml version="1.0" encoding="UTF-8"?>

http://localhost:3000/sitemap-0.xml

sitemap-0.xml <?xml version="1.0" encoding="UTF-8"?>

http://localhost:3000/opengraph-image.jpg2024-06-24T12:47:00.408Zdaily0.7 http://localhost:3000/twitter-image.jpg2024-06-24T12:47:00.409Zdaily0.7

`

Thank you very much upfront for your support.

ollebergkvist commented 1 week ago

Same issue here, using latest version of nextjs (app router), we also just get an empty sitemap...

Have followed the instructions in the docs.