Where Does Astro Store Config and Output?
Astro config, content and dist output inside your project on Windows, macOS and Linux.
Last updated
Astro keeps everything inside the project folder. astro.config.* sits at the root, content lives in src, and the built site lands in dist.
Cache sits in node_modules/.astro when dev runs. There is no per user config. Move the folder and the site moves with it. Hosts should point at dist after build.
Where Astro stores this, by platform
[SiteDir]\astro.config.mjs
Config at root, pages in [SiteDir]\src\pages\, output in [SiteDir]\dist\. Delete dist and node_modules\.astro to force a clean build. Keep config and src in git.
[SiteDir]/astro.config.mjs
Same in-folder layout. Content collections live under src/content. Moving between Mac and PC needs only a fresh npm install.
[SiteDir]/astro.config.mjs
Same arrangement. CI builds to dist by default. Exclude node_modules and dist from version control. Exact config extension may vary (mjs, ts).
Frequently asked questions
Where is the built Astro site?
In dist under the project root after astro build. That folder is disposable output. Source is astro.config plus src pages, content and public assets.
Which Astro files belong in git?
Commit config, src, public and package.json. Ignore node_modules and dist. A fresh clone plus install plus build reproduces the site.
Notice an outdated path? Let us know.