Visual editing for Astro, with no second source of truth
Описание и применение
Разработчики Astro могут визуально редактировать страницы напрямую в исходных файлах, сохраняя изменения в тех же коммитах и PR, с возможностью использования ИИ для сложных задач.
Задача
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