Robots
Integrations
Nuxt Content
How to use the Nuxt Robots module with Nuxt Content.
Nuxt Robots integrates with Nuxt Content out of the box. Allowing you to configure if a page should be indexable or not right from your markdown files.
Setup
Simply use the robots: false
frontmatter key to opt out of indexing a page.
content/foo.md
---
robots: false
---
This will require that your markdown files have an associated path. When using Document Driven Mode, all markdown files will automatically have a path set.
Otherwise, you will need to make sure your markdown files have a path
key.
content/foo.md
---
path: /foo
robots: false
---
How it works
This will add an entry to your robots.txt
file that looks like this:
User-agent: *
Disallow: /foo
It will add the X-Robots-Tag
header and <meta name="robots">
tag to the page with the value of
robotsDisabledValue
.