nuxt-modules / robots

Tame the robots crawling and indexing your Nuxt site.
https://nuxtseo.com/robots
MIT License
424 stars 34 forks source link

Array of Disallows are comma-separated when using a function #20

Closed rinu closed 5 years ago

rinu commented 5 years ago

Example configs

{
  UserAgent: '*',
  Allow: '/',
  Disallow: ['/hurrdurr1', '/hurrdurr2/']
}

and

{
  UserAgent: '*',
  Allow: '/',
  Disallow: () => ['/hurrdurr1/', '/hurrdurr2/']
}

should produce the same output but don't.

When not using a function, the result has

Disallow: /hurrdurr1/
Disallow: /hurrdurr2/

but when using a function the result has

Disallow: /hurrdurr1/,/hurrdurr2/

The expected result when using a function is every Disallow using a new line, just like without a function.