2022-07-07 18:27:34 +00:00
---
title: 'content'
2022-11-21 15:51:39 +00:00
head.title: 'content/'
2023-10-18 10:59:43 +00:00
description: Use the content/ directory to create a file-based CMS for your application.
navigation.icon: i-ph-folder-duotone
2022-07-07 18:27:34 +00:00
---
2023-10-18 10:59:43 +00:00
[Nuxt Content ](https://content.nuxt.com ) reads the [`content/` directory ](/docs/guide/directory-structure/content ) in your project and parses `.md` , `.yml` , `.csv` and `.json` files to create a file-based CMS for your application.
2022-07-07 18:27:34 +00:00
- Render your content with built-in components.
- Query your content with a MongoDB-like API.
- Use your Vue components in Markdown files with the MDC syntax.
- Automatically generate your navigation.
2023-10-18 10:59:43 +00:00
::read-more{to="https://content.nuxt.com" target="_blank"}
Learn more in **Nuxt Content** documentation.
2022-07-07 18:27:34 +00:00
::
2023-10-18 10:59:43 +00:00
## Enable Nuxt Content
2022-07-07 18:27:34 +00:00
2023-10-18 10:59:43 +00:00
Install the `@nuxt/content` module in your project as well as adding it to your `nuxt.config.ts` with one command:
2022-07-07 18:27:34 +00:00
2023-10-18 10:59:43 +00:00
```bash [Terminal]
npx nuxi module add content
2022-07-07 18:27:34 +00:00
```
2023-10-18 10:59:43 +00:00
## Create Content
2022-07-07 18:27:34 +00:00
2023-10-18 10:59:43 +00:00
Place your markdown files inside the `content/` directory:
2022-07-07 18:27:34 +00:00
```md [content/index.md]
# Hello Content
```
The module automatically loads and parses them.
2023-10-18 10:59:43 +00:00
## Render Content
2022-07-07 18:27:34 +00:00
2023-10-18 10:59:43 +00:00
To render content pages, add a [catch-all route ](/docs/guide/directory-structure/pages/#catch-all-route ) using the [`<ContentDoc>` ](https://content.nuxt.com/components/content-doc ) component:
2022-07-07 18:27:34 +00:00
2023-08-03 11:05:29 +00:00
```vue [pages/[...slug\\].vue]
2022-07-07 18:27:34 +00:00
< template >
< main >
2023-11-16 14:42:42 +00:00
<!-- ContentDoc returns content for `$route.path` by default or you can pass a `path` prop -->
< ContentDoc / >
2022-07-07 18:27:34 +00:00
< / main >
< / template >
```
## Documentation
2023-10-18 10:59:43 +00:00
::callout
Head over to < https: / / content . nuxt . com > to learn more about the Content module features, such as how to build queries and use Vue components in your Markdown files with the MDC syntax.
2022-07-07 18:27:34 +00:00
::