You can start playing with Nuxt Content in your browser using our online sandboxes:
Or open the embedded playground.
npx nuxi@latest init content-app -t content
It will ask you with which package manager you want to install the dependencies.
content-app folder and start the development server:pnpm run dev
You can add Nuxt Content at anytime during your Nuxt project development by installing the @nuxt/content module:
npx nuxi@latest module add content
Then, add @nuxt/content to the modules section of nuxt.config.ts:
export default defineNuxtConfig({
modules: [
'@nuxt/content'
],
content: {
// ... options
}
})
Place your markdown files inside the content/ directory in the root directory of your project.
# Hello Content
The module automatically loads and parses them.
To render content pages, add a catch-all route using the ContentDoc component:
<template>
<main>
<ContentDoc />
</main>
</template>
[
{
"title": "I am a partial",
"path": "/content-v2/_partials/hello-world",
"stem": "content-v2/_partials/hello-world",
"description": "With some Hello World text."
},
{
"title": "Edge Channel",
"path": "/content-v2/get-started/edge-channel",
"stem": "content-v2/1.get-started/4.edge-channel",
"description": "Nuxt Content is landing commits, improvements, and bug fixes every day. You can opt-in to test them earlier before the next release."
}
]