---
title: "Nuxt Content"
description: "How to use the Nuxt Robots module with Nuxt Content."
canonical_url: "https://nuxtseo.com/docs/robots/advanced/content"
last_updated: "2026-05-14T07:11:04.041Z"
---

## Introduction

Nuxt Robots comes with an integration for Nuxt Content that allows you to configure robots straight from your markdown directly.

## Setup Nuxt Content v3

Add `defineRobotsSchema()` to your collection's schema to enable the `robots` frontmatter key.

```ts [content.config.ts]
import { defineCollection, defineContentConfig } from '@nuxt/content'
import { defineRobotsSchema } from '@nuxtjs/robots/content'
import { z } from 'zod'

export default defineContentConfig({
  collections: {
    content: defineCollection({
      type: 'page',
      source: '**/*.md',
      schema: z.object({
        robots: defineRobotsSchema(),
      }),
    }),
  },
})
```

To ensure the tags actually gets rendered you need to ensure you're using the `useSeoMeta()` composable with `seo`.

```vue [[...slug].vue]
<script setup lang="ts">
import { queryCollection, useRoute } from '#imports'

const route = useRoute()
const { data: page } = await useAsyncData(`page-${route.path}`, () => {
  return queryCollection('content').path(route.path).first()
})
// Ensure the SEO meta tags are rendered
useSeoMeta(page.value?.seo || {})
</script>
```

Due to current Nuxt Content v3 limitations, you must load the robots module before the content module.

```ts
export default defineNuxtConfig({
  modules: [
    '@nuxtjs/robots',
    '@nuxt/content' // <-- Must be after @nuxtjs/robots
  ]
})
```

## Setup Nuxt Content v2

In Nuxt Content v2 markdown files require either [Document Driven Mode](https://content.nuxt.com/document-driven/introduction) or a `path` key to be set
in the frontmatter.

```md [content/foo.md]
---
path: /foo
---
```

## Usage

You can use any boolean or string value as `robots` that will be forwarded as a
[Meta Robots Tag](/learn-seo/nuxt/controlling-crawlers/meta-tags).

<code-group>

```md [input.md]
robots: false
```

```html [output]
<meta name="robots" content="noindex, nofollow">
```

</code-group>

### Disabling Nuxt Content Integration

If you need to disable the Nuxt Content integration, you can do so by setting the `disableNuxtContentIntegration` option in the module configuration.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  robots: {
    disableNuxtContentIntegration: true,
  }
})
```
