We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Programming, Tech and other random blurbs
https://blog.psousa.dev/posts/generate-dynamic-sitemap-with-storyblok-and-next-js
The text was updated successfully, but these errors were encountered:
Sweet post, Pedro! Thanks :)
Sorry, something went wrong.
Thanks a lot for this post, was a great starting point! I just added the last published date to the sitemap
const generateSitemap = (posts, url) => { return `<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> ${posts .map( ({ slug, published_at }) => ` <url> <loc>https://${url}/${slug}</loc> <lastmod>${published_at}</lastmod> </url>`, ) .join("")} </urlset>`; };
... and used the same technique for robots.txt in order to avoid the hardcoded URL.
No branches or pull requests
Generate Dynamic Sitemap with Storyblok and Next.js | Pedro Sousa
Programming, Tech and other random blurbs
https://blog.psousa.dev/posts/generate-dynamic-sitemap-with-storyblok-and-next-js
The text was updated successfully, but these errors were encountered: