templates(website): add next sitemap robots disallow config for /admin (#9761)
Sets robots disallow to /admin
This commit is contained in:
@@ -1,14 +1,20 @@
|
|||||||
/** @type {import('next-sitemap').IConfig} */
|
|
||||||
const SITE_URL =
|
const SITE_URL =
|
||||||
process.env.NEXT_PUBLIC_SERVER_URL ||
|
process.env.NEXT_PUBLIC_SERVER_URL ||
|
||||||
process.env.VERCEL_PROJECT_PRODUCTION_URL ||
|
process.env.VERCEL_PROJECT_PRODUCTION_URL ||
|
||||||
'https://example.com'
|
'https://example.com'
|
||||||
|
|
||||||
|
/** @type {import('next-sitemap').IConfig} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
siteUrl: SITE_URL,
|
siteUrl: SITE_URL,
|
||||||
generateRobotsTxt: true,
|
generateRobotsTxt: true,
|
||||||
exclude: ['/posts-sitemap.xml', '/pages-sitemap.xml', '/*', '/posts/*'],
|
exclude: ['/posts-sitemap.xml', '/pages-sitemap.xml', '/*', '/posts/*'],
|
||||||
robotsTxtOptions: {
|
robotsTxtOptions: {
|
||||||
|
policies: [
|
||||||
|
{
|
||||||
|
userAgent: '*',
|
||||||
|
disallow: '/admin/*',
|
||||||
|
},
|
||||||
|
],
|
||||||
additionalSitemaps: [`${SITE_URL}/pages-sitemap.xml`, `${SITE_URL}/posts-sitemap.xml`],
|
additionalSitemaps: [`${SITE_URL}/pages-sitemap.xml`, `${SITE_URL}/posts-sitemap.xml`],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user