Migrate from Decap or Sveltia
Decap and Sveltia store content as markdown files in your repository and edit them through a config.yml. Menestrel replaces that pair with an API and an admin, while your site stays 100 % static. The migration is mechanical: your collections map to cms.config.ts, your files import with menestrel import, your components keep working through the loader.
This guide was written from a real migration: a five-singleton showcase site with 23 images, done end to end in under half an hour.
-
Connect the site
Terminal window npx create-menestrel@latest # or, in an existing site:npx menestrel initinitdetects Astro, writes your token to.env, creates a startercms.config.tsand wirescontent.config.tsto the Menestrel loader. -
Translate config.yml into cms.config.ts
Each Decap/Sveltia collection becomes a
collection()(orsingleton()forfiles:collections); each widget maps to a field builder:config.yml widget cms.config.ts stringfields.text()textfields.textarea()markdownfields.richtext()numberfields.number()booleanfields.boolean()selectfields.select({ options })datetimefields.date()orfields.datetime()imagefields.image()listfields.repeater({ fields })objectfields.group({ fields })relationfields.relation({ to })Then push the schema:
menestrel sync(the diff is shown before applying). -
Import the content
Terminal window menestrel import --dry-run # scan and map, writes nothingmenestrel import # entries, then images, then publishThe importer reads your markdown frontmatter and bodies, uploads the referenced images, waits for their processing and publishes. Localized files (
title.fr, suffixed files) land as per-field locales. -
Swap the rendering
Your templates already read
getCollection(): they keep doing exactly that, through the Menestrel loader. Replace direct<img>of repository files with<CmsImage />and markdown rendering with<RichText />, then:Terminal window menestrel pull && npm run build -
Clean up
Remove
public/admin/,config.ymland the git-gateway backend. Your editors sign in at your Menestrel admin from now on; the repository stops receiving content commits.