Hello world
comarknuxt
Welcome to this blog built with Comark and Nuxt UI.
Comark parses Markdown and custom :: components in Nitro server routes and renders them on the server with @comark/vue.
app/components/Alert.vue on the server without extra component registration.Why pair Comark with Nuxt UI
- Server-rendered: Nitro routes call
parseMarkdown(), andMarkdownDocumentrenders the parsed tree during SSR. - Static generation:
nuxt generatepre-renders every post route at build time. - Component syntax: write
::alertblocks directly in.mdfiles and resolve them againstapp/components/. - Nuxt UI prose:
@comark/vueenables Nuxt UI'sProse*components for headings, paragraphs, code blocks, and lists.
import { parseMarkdown } from 'comark'
const tree = await parseMarkdown(markdown)
// <MarkdownDocument :value="tree" />