nuxt-seo
nuxt-seo copied to clipboard
help:
📚 What are you trying to do?
i was using like this before
robots: {
...(process.env.NUXT_PUBLIC_APP_NODE_ENV === 'production'
? {
configPath: './robots/robots.config.ts',
}
: {
groups: [
{
UserAgent: '*',
Disallow: '/',
},
],
}),
},
but after version change i am so lost. if anyone know what can i please help me.
🔍 What have you tried?
No response
ℹ️ Additional context
No response
NUXT_SITE_ENV=staging i guess this was what i needed.
question 2: normally i was using configpath="./robots/robots.config.ts"
like this. and configpath is gone now.
should i just create _robots.txt and write the things into that?
Hi, either use _robots.txt if you don't need runtime control or use one of the nitro hooks.
The module automatically disables non-production sites from being indexed as you've seen.