All pages
On this page
Migrating from Astro
View as MarkdownImport an existing Astro project in one command.
bin/rails generate andromeda:import_astro ../my-astro-siteThe generator:
- copies
src/contentintoapp/content/andsrc/assetsintoapp/assets/ - rewrites frontmatter keys to
snake_case, leaving the body byte-identical - rewrites MDX imports to partial paths (
content_components/callout) - converts
content.config.tsinto entry classes - generates a stub partial for every component the content imports
- prints what still needs a human
--dry-run prints the same report without writing anything.
What carries over
| From Astro | Here |
|---|---|
.md / .mdx bodies | unchanged |
| Entry ids, and therefore URLs | same rules as glob() |
| Heading ids | same (github-slugger) |
headings from render() | entry.headings, same shape |
| Zod schemas | converted 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