Getting started
Markvia requires Node.js >=24. The package manager examples below use pnpm.
-
Install the runtime and a renderer:
Terminal window pnpm add @markvia/core @markvia/html -
Create a runtime and choose a renderer:
import { createMarkdown } from '@markvia/core'import { htmlRenderer } from '@markvia/html'const runtime = createMarkdown()const html = runtime.render('# Hello', htmlRenderer) -
Run the project’s type checks and tests:
Terminal window pnpm checkpnpm test
Complete example
Section titled “Complete example”The following code is loaded directly from examples/basic.ts in the repository:
import { createMarkdown } from '@markvia/core'import { htmlRenderer } from '@markvia/html'
const runtime = createMarkdown()const source = '# Markvia\n\nWrite Markdown once, render it everywhere.'
console.log(runtime.render(source, htmlRenderer))createMarkdown() parses Markdown and produces Render IR. A renderer only maps that IR to its target output.