Using Nuxts nuxt-robots module how do I configure multipe disallows per user agent. Currently I have :
robots: () => {
return {
UserAgent: '*',
Disallow: '/search/',
Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
}
},
but I need to output:
User-agent: *
Disallow: /search/
Disallow: /testimonials/
User-agent: MJ12bot
Disallow: /search/
Disallow: /testimonials
If you want several elements, you probably need to use an array.
Isn't something like this working?
robots: () => {
return [
{
UserAgent: '*',
Disallow: '/search/',
Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
},
{
UserAgent: 'MJ12bot',
Disallow: '/search/',
Sitemap: (req) => `https://${req.headers.host}/sitemap.xml`,
},
]
}
Like the array approach: https://github.com/fengsi-io/nuxt-robots#array