Visual editing for Astro, with no second source of truth
说明与用途
Astro 开发者可以直接在源文件中进行可视化编辑,保持更改在同一提交和 PR 中,并可选择使用 AI 进行复杂编辑。
问题
Developers using Astro want to edit page content visually without creating a separate CMS or second source of truth, while keeping edits in the same source files and Git workflow.
结果
Developers can visually edit Astro pages directly in source files, with deterministic changes recorded in diffs and optional AI assistance for complex transformations, all while keeping the workflow within Git and avoiding a separate CMS.
工作流
- Install @sudodevstudio/astro-ai via npm
- Add buildWithAI integration to astro.config.mjs
- Start Astro dev server and open Build with AI toolbar
- Select an element on the rendered page
- Perform deterministic edit (e.g., change heading text) or AI-assisted request
- Integration updates the source file and Vite HMR renders changes
- Undo/redo via patch-transaction store if needed
证据
Editing a heading produces this: ...
Deterministic edits replace specific source ranges without regenerating the file from an AST.
The toolbar, instrumentation, and agent bridge are enabled only in the dev server.
- 记录日期: 2026-09-14T12:16:07.577Z