- Follow the Nuxt 3 Prerequisites
- Download the VS Code MDC Extension
Get started with Nuxt Content by creating a new project or adding it to an existing Nuxt application.
You can start playing with Nuxt Content in your browser using our online sandboxes:
Play on StackBlitzPlay on CodeSandboxBefore getting started, please make sure to have installed the recommended setup:
npx nuxi init content-app -t content
content-app
folder:pnpm install --shamefully-hoist
pnpm dev
to start your Nuxt content app in development mode:pnpm run dev
You can add Nuxt Content at anytime during your Nuxt project development by installing the @nuxt/content
module:
pnpm add -D @nuxt/content
Then, add @nuxt/content
to the modules
section of nuxt.config.ts
:
export default defineNuxtConfig({ modules: [ '@nuxt/content' ], content: { // https://content.nuxtjs.org/api/configuration }})
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>