diff --git a/templates/website/next-sitemap.config.cjs b/templates/website/next-sitemap.config.cjs index be044270a..689f08831 100644 --- a/templates/website/next-sitemap.config.cjs +++ b/templates/website/next-sitemap.config.cjs @@ -1,14 +1,20 @@ -/** @type {import('next-sitemap').IConfig} */ const SITE_URL = process.env.NEXT_PUBLIC_SERVER_URL || process.env.VERCEL_PROJECT_PRODUCTION_URL || 'https://example.com' +/** @type {import('next-sitemap').IConfig} */ module.exports = { siteUrl: SITE_URL, generateRobotsTxt: true, exclude: ['/posts-sitemap.xml', '/pages-sitemap.xml', '/*', '/posts/*'], robotsTxtOptions: { + policies: [ + { + userAgent: '*', + disallow: '/admin/*', + }, + ], additionalSitemaps: [`${SITE_URL}/pages-sitemap.xml`, `${SITE_URL}/posts-sitemap.xml`], }, }