Markdown from
any source,
in any framework.

Read a folder, a GitHub repository, or a storage bucket at runtime through one API: get pages, list them, build navigation. No build step, and remote content updates without a redeploy. Types, search, and SQL queries are opt-in.
content.ts
import { comarkContent } from 'comark-content'
import fs from 'comark-content/sources/fs'

export const content = comarkContent({
  source: fs('./content'), // or GitHub, or a bucket
})

// reads and parses content/about.md at runtime
const page = await content.get('/about')
page.data.title // 'About', from the frontmatter
page.nodes      // the body, ready to render

// built from your folders
const nav = await content.navigation()

// Works with your stack //

// Start small //

One file today. Everything else when you need it.

Docs sites, blogs, changelogs, knowledge bases, content for LLM pipelines. The first result takes a few minutes, and nothing you add later changes how you read a page.

content/about.md
---
title: About
---

# About us

We write documentation for a living.
index.ts
const page = await content.get('/about')

page.path  // '/about'
page.data  // { title: 'About' }
page.nodes // [['h1', { id: 'about-us' }, 'About us'],
           //  ['p', {}, 'We write documentation...']]

// Sources //

Bring your own source

Content can live in a Git repository on GitHub, GitLab, Codeberg, or another forge, in any storage driver, or in a folder next to your app. The API stays the same. This site runs on that setup: its pages live in a GitHub repository and go live on push, with a preview per branch.

content.ts
import { comarkContent } from 'comark-content'
import forge from 'comark-content/sources/forge'
import { github } from 'forges/github'

const content = comarkContent({
  source: forge({
    provider: github(),
    repo: 'nuxt/nuxt',
    ref: 'main',
    path: 'docs',
  }),
})

const page = await content.get('/getting-started/views')

// Typed API //

Typed, searchable, queryable

Types are generated from your actual frontmatter and narrow get, list, and query by instance and by path. Add SQLite when you want SQL queries and full-text search.

Terminal
npx comark-content prepare
index.ts
// '/posts/hello' autocompletes, no type parameter
const post = await content.get('/posts/hello')
if (!post) throw new Error('Page not found')

post.data.title // string
post.data.tags  // string[] | undefined
post.data.titel
//        ^ Property 'titel' does not exist.
//          Did you mean 'title'?

// Capabilities //

A small core. Everything else is a plugin.

Works with your stack
Nuxt, Next.js, Vite, SvelteKit, Nitro, Node, or Hono: mount one handler, render with Vue, React, or Svelte.
Documents and assets, together
Images and files live next to your Markdown: query them like content, serve them where they are referenced.
Type-safe from your frontmatter
Generated types narrow get() and query() by instance and by path. Run one CLI command, or let the Vite plugin generate them.
Lightweight core
Three methods: get, list, navigation. Plugins cover the rest.
Opt-in SQL and search
Skip the database for small sites. Add SQLite through a plugin when you want SQL queries and BM25 full-text search.
Navigation for free
content.navigation() builds an ordered, nested tree from your files: numeric prefixes, .navigation.yml, frontmatter overrides.

// Compare //

Know what you're replacing

vs Contentlayer
Runtime parsing from any source vs an unmaintained build-time compiler coupled to your bundler.
vs Astro Content Collections
The same typed collections, without the two constraints: any framework, no rebuild on content changes.
vs Headless CMS
Markdown in storage you own, turned into a queryable API without a hosted database or vendor API.

// FAQ //

Common questions

Add a content layer in five lines.

One source, one get(), a printed title in a few minutes. Add search and queries when you need them, and write in Comark syntax when you need components.
© 2026 Vercel, Inc.