Skip to content

Import an existing site

menestrel import migrates an Astro site already in place. It scans src/content/ and src/data/, maps each file onto your schema, uploads images once per identical content, then creates and publishes the entries. Slugs are locked: production URLs do not move.

  1. Describe the schema

    The skeleton produced by menestrel init is a good start. Adjust the fields so they match your frontmatter and your JSON files.

  2. Preview without writing anything

    --dry-run scans, maps and counts degradations without touching the server or the media.

    Fenêtre de terminal
    npx menestrel import --dry-run
  3. Run the import

    Fenêtre de terminal
    npx menestrel import --yes

    The import is resumable: if the process is interrupted, run it again, already-created entries are skipped and already-uploaded images are not sent twice.

  • The Markdown body becomes a richtext field; a level-1 heading or a table is flagged then degraded, never lost silently.
  • Relative images and those under /public are uploaded and deduplicated by checksum; the Markdown alt is kept.
  • Import is single-locale (default locale). After import, the admin is the only source of truth: source files are never re-imported.

Once the site is migrated, menestrel export stays available at any time to get your content back as Markdown and JSON. See the CLI reference.