

Announcing Nuxt Content v2
source link: https://content.nuxtjs.org/blog/announcing-v2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Announcing Nuxt Content v2
2 years after the release of Content v1, we are proud to announce the second version of Nuxt Content built for Nuxt 3.
2 years after the release of Content v1, we are proud to announce the second version of Nuxt Content built for Nuxt 3.
On top of the Nuxt 3 support, it comes with new features:
- The MDC Syntax for Components in Markdown
- Internationalization support
- Navigation generation
- Fully typed
- Multiple sources (experimental)
- Live preview edition (coming soon)
What is Nuxt Content?
Nuxt Content is a Nuxt module that reads Markdown, YAML, CSV and JSON files in the content/
directory.
Let’s imagine a content/
directory with the following structure:
content/
index.md
Create a pages/[...slug].vue
file with the <ContentDoc>
component inside:
<template> <ContentDoc /></template>
And voilà!
You can also query the hello.md
file by using the queryContent()
composable:
const file = await queryContent('hello').findOne()
The returned file won't be Markdown or HTML, but a JSON representing the abtract syntax tree.
You can do much more than fetching only one file. Take a look at the querying content section to discover its full potential.
Introducing MDC
We wanted to leverage the power of Vue components in a content edition experience. After months of testing on the Nuxt website, we are happy to introduce the MarkDown Components syntax.
- Use your own Vue components in Markdown
- Customize them with props
- Write Markdown content in slots (and of course, you can nest them)
- Experience blazing fast HMR for Markdown and MDC (as fast as Vite!)
.md
extension.Show me how it works!
::my-button{type="success"} ✏️ Start **writing!**::
Head over to the MDC guide to discover the full power of Markdown with Vue components.
An introduction video
Nuxt Content has many features, we built a video to showcase how to start using it in a Nuxt 3 application, in 3 minutes ✨

Thank you
We are thankful for all the contributions we received in Content v1 and are impatient to see what you will build with Nuxt 3 and Content v2 😊
Head over to the Get started section to start playing with Content v2 ✨
Bonus: We created Content Wind - a lightweight Nuxt template to write a Markdown-driven website powered by Nuxt Content and TailwindCSS.
It is available on GitHub. Check out the demo on content-wind.nuxt.dev.
Recommend
-
93
Files Permalink Latest commit message Commit...
-
62
前言 笔者最近业余时间想着学点新东西,于是开始接触服务器端渲染(SSR),花了一周的时间学习和实战,然后在周末高仿掘金撸了一个 SSR 的 Demo 项目。 技术栈选的是平滑开箱的 Nuxt,整个项目整合了 vue + nuxt + axios + vuex
-
51
-
67
Nuxt.js 基础入门教程
-
82
We are really excited to release Nuxt.js v2.0.0, a major release with a lot of improvements. We recommend to look at the GitHub release note to know more about the technical details ?️. We are…
-
116
AMP Project pages are consistently fast and accessible and have premium placement in Google search results. With a few tweaks to the rendering process, it's possible to make...
-
41
README.md Now Builder for Nuxt.js
-
37
Nuxt JS Nuxt is a framework built for c...
-
8
Hey there, and welcome to this tutorial. This will be an in-depth guide on creating your own personal blog using Nuxt, a meta-framework built on top of VueJS. Nuxt is designed...
-
4
How To Easily Create a Blog With Nuxt Content
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK