Andromeda

Migrating from Astro

View as Markdown

Import an existing Astro project in one command.

bin/rails generate andromeda:import_astro ../my-astro-site

The generator:

  1. copies src/content into app/content/ and src/assets into app/assets/
  2. rewrites frontmatter keys to snake_case, leaving the body byte-identical
  3. rewrites MDX imports to partial paths (content_components/callout)
  4. converts content.config.ts into entry classes
  5. generates a stub partial for every component the content imports
  6. prints what still needs a human

--dry-run prints the same report without writing anything.

What carries over

From AstroHere
.md / .mdx bodiesunchanged
Entry ids, and therefore URLssame rules as glob()
Heading idssame (github-slugger)
headings from render()entry.headings, same shape
Zod schemasconverted to attribute lines
image() and reference()the :image and :reference types

What needs your hands

  • Components. A .astro, React or Vue component becomes a Rails partial. The generator writes the stub and lists what to fill in.
  • remark/rehype plugins. Not supported; content that depends on one needs an equivalent, or an edit.
  • Pages and layouts. Routing is Rails routing.

Astro’s own examples/blog imports and renders unchanged — that is a test in the gem’s suite, not an aspiration.

Last updated September 24, 2026