diff --git a/.gitignore b/.gitignore index 37b0891d..e4f1f89c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,7 @@ storybook-static # mdx enhanced .mdx-data .mongo + +# next-sitemap +/public/sitemap.xml +/public/robots.txt \ No newline at end of file diff --git a/src/pages/docs/features.md b/src/pages/docs/features.md index 6af6b5c5..2df6b60c 100644 --- a/src/pages/docs/features.md +++ b/src/pages/docs/features.md @@ -131,6 +131,10 @@ In `next.config.js`, you'll find a demonstration of how to **safely** inject inf For example, we use it to inject current version into the `html` tag for better deployment tracking. +### Sitemap.xml and Robots.txt with next-sitemap + +We use [next-sitemap](https://github.com/iamvishnusankar/next-sitemap#readme) to create both the `robots.txt` and `sitemap.xml` in the `postbuild` script. Change `https://vulcan.next` to your root url in `/vulcan-next-sitemap.js`. Here's more [configuration options](https://github.com/iamvishnusankar/next-sitemap#configuration-options). + ### Performance debugging [See official doc](https://nextjs.org/docs/advanced-features/measuring-performance). diff --git a/vulcan-next-sitemap.js b/vulcan-next-sitemap.js index d06d4c38..3530a5ec 100644 --- a/vulcan-next-sitemap.js +++ b/vulcan-next-sitemap.js @@ -8,6 +8,7 @@ module.exports = { { userAgent: '*', disallow: ['/vns/*', '/login', '/profile', '/signup', '/admin', '/auth'], + //allow: ['/','/docs/*'], }, ] }