GitShow/withastro/astro
withastro

astro

The web framework for content-driven websites. ⭐️ Star to support our work!

by withastro
astroblogbrowsercomponentshybridislandsnodeserver
Star on GitHubForkWebsitenpm

TypeScript

62.3k stars3.8k forks1.2k contributorsActive · 7h agoSince 2021astro@7.3.1

Meet the team

See all 1221 on GitHub →
matthewp
matthewp2.1k contributions
astrobot-houston
astrobot-houston1.6k contributions
ematipico
ematipico1.2k contributions
FredKSchott
FredKSchott1.1k contributions
Princesseuh
Princesseuh975 contributions
natemoo-re
natemoo-re848 contributions
bluwy
bluwy782 contributions
github-actions[bot]Bot
github-actions[bot]593 contributions

Languages

View on GitHub →
TypeScript94.5%
Astro3%
JavaScript2.1%
CSS0.1%
Vue0.1%
MDX0.1%
Other0.1%

Commit activity

Last 12 weeks · 442 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
100
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · Last activity 7h ago
See all on GitHub →
SudoDevStudio
fix(dev-toolbar): keep app canvas content across client-side navigationOpenPR

Changes A dev toolbar app's UI is destroyed on the first client-side navigation and never restored — silently, with no error and still . assigns , which replaces rather than appends, discarding whatever the app rendered into its canvas. The canvas reconnects on every navigation. Nothing rebuilds it — sits behind the guard, so never runs a second time. Fix:** write the style once in the constructor and drop , which had no other job. Only is affected. projects through a `DevToolbarTooltippatchthird-party app content survives a client-side navigationpackages/astro/e2e/dev-toolbar.test.tsdev-toolbarview-transition-abtoHaveCount: Expected 1, Received 0`), passes again once restored. Docs

SudoDevStudio · 1m ago
suletetes
fix(internal-helpers): detect file extension on bare filenames in hasFileExtensionOpenPR

Changes in answers "does this path point at a file with an extension?" but its regex required a slash immediately before the filename (). Because of the leading slash, a bare filename with no directory segment was never matched: The fix anchors the match to the start of the string or a slash: . This is strictly additive: it only changes results for inputs lacking a leading path segment (incorrect becomes correct ). Every path beginning with and every genuinely extension-less input is unchanged. Why it matters decides trailing-slash behavior and static-file handling, including (called on a base-stripped request path that can be a bare filename), and / endpoint trailing-slash decisions. A bare asset filename could previously be misclassified as extension-less. Testing Added a block to (the function previously had no tests) covering directory paths, bare filenames, multi-dot names, extension-less paths, and a trailing dot. Local checks, all green: build, (70 pass / 0 fail), biome format/lint/check, typecheck, and (patch bump for , cascading to ). Docs No user-facing docs change; internal helper behavior fix. Changeset included ().

suletetes · 2h ago
suletetes
fix(content): don't mutate readonly schemas during image reference processingOpenPR

What this fixes Fixes #17793. Using Zod's on an object containing an Astro field causes the Content Layer to throw a runtime during content processing: The schema itself is valid Zod and parses the content successfully the failure happens afterward, when Astro processes image references. Root cause In , the collection accessor's handler walks the parsed with neotraverse's and calls to strip the from image strings. That is an in-place mutation. When the user's schema uses , Zod returns a frozen object (and frozen nested objects), so mutating it directly throws. The fix Before traversing/mutating, produce a deep mutable clone with , run the traversal over the clone, and store the clone in the entry. The user's original (possibly frozen) object is never written to. This matches the direction suggested in the issue "operate on a mutable copy rather than mutate the object returned by the user's schema." is safe here because the content-layer data is plain, devalue-serializable data at this point (it is about to be serialized to disk). The image-prefixing schema-parse path is untouched. Tests Added a regression test in : "handles frozen data from a schema without throwing (issue #17793)." It builds a frozen object (with a nested frozen object) containing image-prefixed values, then asserts that: does not throw, the stored data has the image prefixes stripped, the user's original frozen object is left untouched, the paths are recorded correctly. unit tests: 11/11 pass. All content-collections unit tests: 42/42 pass, no regressions. : no errors ( is a Node 22 global). A changeset is included.

suletetes · 3h ago

Recent fixes

View closed PRs →
n3dst4
Cloudflare 14.3.0: prerender worker loses custom Durable Object exports and fails to startClosedIssue

This was generated by AI during triage.* Astro Info Also resolved: Wrangler 4.129.0, @cloudflare/vite-plugin 1.54.4, Vite 8.2.2, Miniflare 5.20260903.0-alpha, workerd 1.20260903.1. Describe the Bug With a custom worker entrypoint that exports a Durable Object and delegates to , fails when starting the prerender worker in adapter 14.3.0. The reproduction contains one static page and one empty Durable Object. The page never accesses the binding. No credentials, deployment, database, React, or application middleware are required. The entire custom entrypoint is: Wrangler points at this file and declares an binding with and a SQLite migration. Astro uses , , and . Actual error: Regression evidence The fixture source/configuration and the Wrangler, Cloudflare Vite plugin, Vite, Miniflare, and workerd versions are identical between the released-version comparisons. Both version pairs have committed lockfiles on separate branches. Downgrading only the adapter while retaining Astro 7.3.1 hits a separate missing internal export (), so the passing baseline uses the previous Astro/adapter pair. The one-line workaround above was tested independently on the new pair, then reverted to confirm the same original crash returns. Suspected cause #17887 (commit 35aa62e) adds this to in the Cloudflare adapter: The callback copies the entry worker's Durable Object bindings into the prerender worker, but now replaces the entrypoint exporting those classes. The default adapter entrypoint does not export , so the Miniflare wrapper attempts to extend . Retaining the custom entrypoint is a diagnostic workaround for this fixture, not a proposed general fix: I understand #17887 deliberately uses the default entrypoint to support custom Fetch/Hono pipelines during prerendering. The prerender worker's Durable Object bindings and class exports need to remain consistent with that design. What's the expected result? The static page should prerender successfully when the custom entrypoint exports the configured Durable Object. A binding that the page does not access should not prevent the prerender runtime from starting. Link to Minimal Reproducible Example https://github.com/n3dst4/astro-cloudflare-durable-object-prerender-repro reproduces the failure. For the passing baseline:

n3dst4 · 9h ago
xriter
Custom 404 page has status code 200 OKClosedIssue

What version of are you using? 2.7.0 Are you using an SSR adapter? If so, which one? Node What package manager are you using? npm What operating system are you using? Mac What browser are you using? Safari Describe the Bug I created a custom 404 page (following the docs: https://docs.astro.build/en/core-concepts/astro-pages/#custom-404-error-page). But when hitting this page, the status code of the document is still 200 OK!? 404 Not Found is expected. (Use the web inspector to see this.) Note that the logs of Astro ARE logging 404 though. Is the status code of the page even set by Astro? What's the expected result? Status code 404 Link to Minimal Reproducible Example https://stackblitz.com/edit/github-xjlmoy?file=src%2Fpages%2Findex.astro Participation [ ] I am willing to submit a pull request for this issue.

xriter · 11h ago
Structured data for AI agents

Repository: withastro/astro. Description: The web framework for content-driven websites. ⭐️ Star to support our work! Stars: 62333, Forks: 3773. Primary language: TypeScript. Languages: TypeScript (94.5%), Astro (3%), JavaScript (2.1%), CSS (0.1%), Vue (0.1%). Homepage: https://astro.build Topics: astro, blog, browser, components, hybrid, islands, node, server, static, static-site-generator, universal. Latest release: astro@7.3.1 (2d ago). Open PRs: 94, open issues: 6. Last activity: 7h ago. Community health: 100%. Top contributors: matthewp, astrobot-houston, ematipico, FredKSchott, Princesseuh, natemoo-re, bluwy, github-actions[bot], florian-lefebvre, bholmesdev and others.

·@ofershap

Replace github.com with gitshow.dev