virtualcoffee.io
virtualcoffee.io copied to clipboard
[Feature] Created sitemap
Linked Issue
closes #1170
Description
This pull request introduces a new generate-sitemap.mjs file to automatically generate and update the sitemap for the website. The script consolidates the sitemap generation logic and ensures it runs after the build process.
Methodology
New Script: Created generate-sitemap.mjs to generate the sitemap.
Postbuild Hook: Updated package.json to include a postbuild script that runs the sitemap generation script automatically after the build process.
Verification
- Run Build:
pnpm run build
- Generate Sitemap:
pnpm run generate-sitemap
- Check Output: Verify
sitemap.xmlis generated correctly.
Code of Conduct
By submitting this pull request, you agree to follow our Code of Conduct
Deploy Preview for virtual-coffee-io processing.
| Name | Link |
|---|---|
| Latest commit | e921ba5147d7ca22bf0a52253e8cfd955d3b0887 |
| Latest deploy log | https://app.netlify.com/sites/virtual-coffee-io/deploys/670b577559ce9a0008184a77 |
Oh one other thing - we should remove the public/sitemap.xml and have it ignored via .gitignore, since it is a generated file 👍
hey @danieltott ! when i am importing generateStaticParams function, it keeps on giving me that the file cannot be located when i am putting the correct location url. could you help me with this? i have tried changing everything but its not locating the file
node:internal/modules/esm/resolve:265
throw new ERR_MODULE_NOT_FOUND(
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\manya\virtualcoffee.io\src\app\newsletter\issues\[slug]\page' imported from C:\Users\manya\virtualcoffee.io\src\app\newsletter\issues\[slug]\check.js
at finalizeResolution (node:internal/modules/esm/resolve:265:11)
at moduleResolve (node:internal/modules/esm/resolve:933:10)
at defaultResolve (node:internal/modules/esm/resolve:1169:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:540:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:509:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:239:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:96:40)
at link (node:internal/modules/esm/module_job:95:36) {
code: 'ERR_MODULE_NOT_FOUND',
url: 'file:///C:/Users/manya/virtualcoffee.io/src/app/newsletter/issues/[slug]/page'
}