The web framework for content-driven websites. ⭐️ Star to support our work!
| Files | Last commit | Last update |
|---|---|---|
fix: dont use internal paths (#17899) | 7 days ago | |
Replace semver with verkit (#17651) Co-authored-by: ematipico <estoppa@cloudflare.com> | 6 hours ago | |
chore(deps): update mcr.microsoft.com/devcontainers/javascript-node docker tag to v4 (#15371) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> | 7 months ago | |
Disable Renovate dependency dashboard (#17902) | 6 days ago | |
Harden command execution in CI and tooling paths (#16418) * chore(ci): harden command execution paths * chore(ci): split out upgrade command hardening * fix(ci): restore shell spawn on Windows for turbo-run-affected The shell is required on Windows because turbo filter arguments contain special characters (globs, brackets, etc.) that cause EINVAL errors when passed directly to CreateProcess without a shell. | 4 months ago | |
chore(renovate): group lockfile maintenance (#15446) | 6 months ago | |
chore: update editor settings (#14195) Co-authored-by: ascorbic <213306+ascorbic@users.noreply.github.com> | 1 year ago | |
Refactor internal request handling into a functional core (#17636) * Refactor request handling into a purely functional core Replace the App/Pipeline god objects with pure functions drawing static data from the manifest (the only permitted ambient source of truth): - All internal handler classes (AstroHandler, PagesHandler, AstroMiddleware, CacheHandler, ActionHandler, I18n, Rewrites, TrailingSlashHandler, error handlers, session provider) are now module functions rooted in FetchState. - FetchState constructs from (manifest, request, options?, hooks?); the public one-arg new FetchState(request) works from a bare Request by reaching the manifest module directly (ambient), with no app handle. - Symbol.for('astro.app') and Symbol.for('astro.pipeline') are deleted; nothing static rides the request. Render options carry only render() inputs. - Environment differences (prod SSR, dev runnable/non-runnable, build, container) are per-manifest RenderEnvironment records composed at entrypoint time; production is the zero-setup default. - Process-lifetime derivations (route table, middleware, actions, session driver, cache provider, logger, renderers) are WeakMap memos keyed by the manifest in their owning modules. - App and NodeApp remain public facades with unchanged signatures; every method delegates to the functional core. app.pipeline survives as a stateless compat shim. Pipeline base and all subclasses are deleted. - Dev HMR route updates are now atomic (fixes stale-router split-brain). No public API changes. All suites green: unit, full integration, @astrojs/node, @astrojs/cloudflare (workerd), dev/HMR. * Remove stray compiled artifacts of components/index.ts * Make error-strategy switch exhaustive for lint * Address review: user-facing changesets, standalone comments Rewrites the three changesets to describe user-facing behavior instead of internals, removes all references to internal planning documents from code comments, and rewrites comments that described pre-refactor behavior to describe how the code currently works. * Add regression test for FetchState in a custom Cloudflare worker Covers the documented advanced pattern from #17591: a custom wrangler entryfile that builds its own state with `new FetchState(request)` from a bare workerd request, serves assets through `cf()`, and renders with `astro(state)`. * Remove unused DefaultFetchHandler.renderWithOptions The method had no callers — BaseApp.render constructs the FetchState itself and generated builds only use the fetch member. Also rewrites the constructor comment to describe the current contract. * Remove AppPipeline and the app.pipeline property The last surviving Pipeline: app.pipeline was undocumented, so the stateless compat shim is gone entirely. The node adapter uses the new public app.getLogger() to wait for the configured log destination, and BuildApp carries the routeCache/getComponentByRoute accessors StaticPaths needs across the prerender bundle boundary. The internal PipelineFeatures bit flags are renamed to FetchFeatures, and @astrojs/node now requires the astro version that ships app.getLogger(). * Memoize the resolved logger with createAsyncManifestMemo Replaces resolveLoggerDestination's hand-rolled WeakMap with a getResolvedLogger accessor built on the shared async manifest memo. The derivation never rejects: a custom log destination that fails to load is reported through the console logger and the request proceeds, instead of failing the first request. * Remove AppPipeline from the benchmark adapter * Address review-bot findings in the dev request path Reject the dev body-buffering promise on stream error so an aborted or malformed upload surfaces through runWithErrorHandling instead of hanging the request, and make DevFacadeApp.devMatch's pathname optional to match the BaseApp contract. * Ship the ambient-manifest stub in the publish tarball The #astro-internal/ambient-manifest types condition points at the src stub, which was not in the files list — nothing consults the path in the published package today, but shipping the file keeps the condition resolvable if a future declaration ever references the specifier. * Clarify the type-only FetchState import comment * Rewrite the RenderEnvironment doc comment in plain language * Make NoManifestAvailableError a documented error with an actionable hint * Update the FetchState no-manifest test for the new error message | 28 days ago | |
chore: update typescript to v6 (#16661) Co-authored-by: Emanuele Stoppa <estoppa@cloudflare.com> | 3 months ago | |
Fix spacing bug in "Examples / Template" Pages. (#17290) Co-authored-by: Emanuele Stoppa <my.burning@gmail.com> | 7 hours ago | |
Replace semver with verkit (#17651) Co-authored-by: ematipico <estoppa@cloudflare.com> | 6 hours ago | |
Fix organize imports across Astro scripts (#17916) | 2 days ago | |
Fix @astrojs/cloudflare frontmatter dep-scan breaking on regex literals with quote characters (#17789) * fix(cloudflare): wrap frontmatter in function instead of rewriting return statements Replace the `RETURN_REPLACE_RE` regex tokenizer with a function-wrapping approach. Instead of rewriting `return` → `throw` (which failed on regex literals containing quote characters), wrap the frontmatter in `async function __astro__() { ... }` so `return` is valid syntax. Static import declarations are hoisted above the wrapper so the dep scanner can still discover them. Fixes #17697 * refactor(cloudflare): remove unused esbuild frontmatter plugin --------- Co-authored-by: factory[bot] <factory[bot]@users.noreply.github.com> Co-authored-by: Matthew Phillips <matthew@matthewphillips.info> | 20 days ago | |
Run non-parallel tests in-process to avoid test-runner IPC corruption (#17333) | 2 months ago | |
chore: upgrade biome and renovate (#10879) | 2 years ago | |
chore: add formatting commit to blame ignore (#11651) | 2 years ago | |
test: parallel testing (#16382) | 4 months ago | |
chore: removed adapters cleanup (#8726) * update ci, readme, comments, remote workspaces * fix hosted test fixture * keep adapter config typedocs | 2 years ago | |
fix(deps): update all non-major dependencies (#15707) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> | 6 months ago | |
feat: remove `@astrojs/db` (#17010) | 3 months ago | |
chore(bot): improve fix check (#17352) | 1 month ago | |
docs: explain tsconfig layout in CONTRIBUTING.md (#16619) | 4 months ago | |
Implement new a11y audits for the Dev Toolbar app (#9170) Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Princesseuh <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Fred K. Schott <fkschott@gmail.com> | 2 years ago | |
Update support section with GitHub discussions link (#17771) | 20 days ago | |
chore: reword security document (#14496) * chore: reword security document * Update SECURITY.md Co-authored-by: Matt Kane <m@mk.gg> --------- Co-authored-by: Matt Kane <m@mk.gg> | 10 months ago | |
Update security contacts list (#15143) | 7 months ago | |
Spelling (#15601) * spelling: ; otherwise, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: "..." Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a new Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a special Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: a Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: accessed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: adapter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: all bugs Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: also need to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: an Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: and Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: astro Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: attributes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: audited Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: baked Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: best-effort Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: build, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: caches Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: can Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: case. Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cause Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: centauri Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: chevron Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: cloudflare Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: committed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: components Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: condition to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: config Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: consistently Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: convoluted Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: could not Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: desperately Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: devtoolbar Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: ensure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: entrypoint Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: equals Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: example -- use rfc6761 domain Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: exist Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: external Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: failure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: fall back Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: flexible Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: frontmatter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: has no Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: highlighting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: image Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: implicitly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: import, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: impractical Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: include Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: incorrect Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: infrastructure Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: initialization Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: issue Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: its Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: javascript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: labelable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: loaded Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: long and short Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lorem Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: lowercase Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: maintenance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: malformed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: markdown Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: middleware Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: mistaken Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: neither-nor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: nonexistent Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: occurred Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: occurrences Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: of Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: open graph Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: optimized Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: otherwise, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: out-of-date Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: packages Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: parsed Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: past, Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: performance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: plugin Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: pre-text Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: preexisting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: prerendered Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: project Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: punctuation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: re-export Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: redirects Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: registries Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: rehype Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: replacements Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: resolved Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: safeguard Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: serverless Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: set up Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: significantly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: solely Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: some Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: stylesheet Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: surname Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that is Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: that Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: the github Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: to be Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: to take effect Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: transitions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: typescript Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: unnecessary Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: uppercase Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: use case Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: user's requested...to Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: whether or not Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: with Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: work around Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> * spelling: your Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --------- Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> Co-authored-by: Armand Philippot <59021693+ArmandPhilippot@users.noreply.github.com> | 6 months ago | |
chore: update biome config (#17901) | 6 days ago | |
feat: remove `@astrojs/db` (#17010) | 3 months ago | |
feat: move MDX into the processors themselves (#17262) Co-authored-by: Armand Philippot <git@armand.philippot.eu> | 12 days ago | |
chore: knip prod mode (#17734) | 21 days ago | |
Replace semver with verkit (#17651) Co-authored-by: ematipico <estoppa@cloudflare.com> | 6 hours ago | |
[ci] format | 7 hours ago | |
Fix error when creating changeset via 'npx @changesets/cli' (#14714) | 9 months ago | |
core: add skill harness (#17686) | 28 days ago | |
[ci] format | 4 months ago | |
core: add skill harness (#17686) | 28 days ago |
Translated by AI, submit an issue feedback

Astro 是一款面向现代 Web 的网站构建工具 —
强大的开发体验,轻量级构建输出。
安装
推荐通过运行以下命令来安装最新版本的 Astro:
npm create astro@latest
你还可以通过运行以下命令手动安装 Astro:
npm install astro
需要帮助?请先从我们的入门指南开始。
想查看快速示例?直接在浏览器中打开一个起步项目。
文档
访问我们的官方文档。
支持
遇到问题?可在官方 Astro Discord 或通过 GitHub 讨论 获取帮助。
贡献
欢迎新贡献者! 如需入门帮助,请查看我们的贡献者指南。
加入我们的 Discord 认识其他维护者。我们会尽快帮你完成第一次贡献!
包目录
部分官方项目在本仓库之外维护:
| 项目 | 仓库 |
|---|---|
| @astrojs/compiler | withastro/compiler |
| Starlight | withastro/starlight |
链接
赞助商
Astro 是一款免费开源软件,感谢这些优秀赞助者的支持。
Introduction
这是一个随着您成长的网页框架 —— 快速构建内容站点、强大的网页应用、动态服务器API,以及介于其间的所有内容 ⭐️ 请给我们点赞以支持我们的工作!【此简介由AI生成】
Others TypeScript15.02 KCommitsastroblogbrowsercomponentshybridislandsnodeserverstaticstatic-site-generatoruniversal
Customize your domain