nuxt-modules / robots

Tame the robots crawling and indexing your Nuxt site.
https://nuxtseo.com/robots
412 stars 30 forks source link

feat: add blank lines and comments #73

Closed ricardogobbosouza closed 1 year ago

ricardogobbosouza commented 1 year ago

Add BlankLine and Comment keys Resolve #59

Ex:

export default defineNuxtConfig({
  modules: [
   '@nuxtjs/robots',
  ],
  robots: {
    rules: [
      { UserAgent: '*' },
      { Disallow: '/' },
      { BlankLine: true },
      { Comment: 'Comment here' },

      // Be aware that this will NOT work on target: 'static' mode
      { Sitemap: (req) => `https://${req.headers.host}/sitemap.xml` }
    ]
  }
})

output:

User-agent: *
Disallow: /

# Comment here
Sitemap: https://robots.nuxtjs.org/sitemap.xml
codecov[bot] commented 1 year ago

Codecov Report

Merging #73 (ddef214) into main (d994b99) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #73   +/-   ##
=======================================
  Coverage   98.38%   98.38%           
=======================================
  Files           1        1           
  Lines          62       62           
  Branches        9        9           
=======================================
  Hits           61       61           
  Partials        1        1           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.