Guide›Getting Started

Getting Started

refrakt.md is a content framework built on Markdoc. You write Markdown, and runes — tags such as {% hint %} or {% recipe %} — give the Markdown inside them a meaning: a list in a recipe becomes its ingredients, a heading in a nav becomes a group title.

Create a site

npx create-refrakt my-site

It asks which framework to build with: sveltekit, astro, next, nuxt, eleventy or html. Pass --target to skip the question, for example npx create-refrakt my-site --target astro. If you have no preference, choose SvelteKit. Adapters compares them.

Start it

cd my-site
npm install
npm run dev

Open the address the dev server prints. With the html target there is no dev server: run npm run build and then npm run serve.

Edit your first page

Open content/index.md. It is the home page:

---
title: Welcome
description: A new refrakt.md site
---

{% cta %}

# Welcome to your site

This site is built with refrakt.md — a content framework that extends Markdown with semantic runes.

- [Get Started](/docs/getting-started)

{% /cta %}

Change the heading and save; the page reloads with your change. Inside {% cta %}, the heading becomes the call to action's headline and the list of links becomes its buttons.

Add a callout below it:

{% hint type="check" %}
Your first rune.
{% /hint %}

Every page is a Markdown file under content/; its path is its URL, so content/about.md is /about. content/_layout.md holds the header and navigation that wrap every page; add your page to its {% nav %} list to link it.

Next

Every scaffolded site has an AGENTS.md at its root with the full reference for the runes it uses, for you and for AI coding tools. Regenerate it with refrakt reference dump after adding a plugin or upgrading a @refrakt-md/* package.