Play online

The content of the card

You can start playing with Nuxt Content in your browser using our online sandboxes:

Or open the embedded playground.

New Project

  1. You can start a fresh Nuxt Content project with:
npx nuxi@latest init content-app -t content

It will ask you with which package manager you want to install the dependencies.

  1. Move into the content-app folder and start the development server:

Add to a project

You can add Nuxt Content at anytime during your Nuxt project development by installing the @nuxt/content module:

Then, add @nuxt/content to the modules section of nuxt.config.ts:

export default defineNuxtConfig({
  modules: [
    '@nuxt/content'
  ],
  content: {
    // ... options
  }
})

Create content

Place your markdown files inside the content/ directory in the root directory of your project.

# Hello Content

The module automatically loads and parses them.

Render pages

To render content pages, add a catch-all route using the ContentDoc component:

<template>
  <main>
    <ContentDoc />
  </main>
</template>