Repository navigation
feat(blog): 6.4 Article #2423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(blog): 6.4 Article #2423
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8724875
feat(blog): Draft for 6.4
Princesseuh b776ec8
feat(blog): add 6.4 release post images
matthewp 4bf9385
fix: tweak
Princesseuh d40b767
Update src/content/blog/astro-640.mdx
Princesseuh 3006619
Apply suggestions from code review
Princesseuh 5fff01f
Apply suggestions from code review
Princesseuh 3114716
Merge branch 'main' into feat/astro-640
Princesseuh 66bcd14
feat: add contributors
Princesseuh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| --- | ||
| title: 'Astro 6.4' | ||
| description: 'Astro 6.4 introduces a new pluggable Markdown processor API, a Rust-based Markdown processor for faster builds, and first-party CDN cache providers for your favorite platforms.' | ||
| homepageLink: | ||
| title: 'Astro 6.4' | ||
| subtitle: 'Available now!' | ||
| publishDate: '2026-05-28' | ||
| authors: | ||
| - erika | ||
| coverImage: '/src/content/blog/_images/astro-640/blog-post-astro-6.4.webp' | ||
| socialImage: '/src/content/blog/_images/astro-640/og-astro-6.4.jpg' | ||
| lang: 'en' | ||
| related: | ||
| - astro-630 | ||
| - astro-620 | ||
| --- | ||
|
|
||
| import Mention from '/src/components/Mention.astro'; | ||
|
|
||
| **Astro 6.4 is here!** On today's menu: a pluggable Markdown pipeline, a new Rust-based Markdown processor for you to try, and first-party CDN cache providers for Cloudflare, Netlify, and Vercel. | ||
|
Princesseuh marked this conversation as resolved.
Resolved
|
||
|
|
||
| Explore what's new in this release: | ||
|
|
||
| - [**New `markdown.processor` API**](#new-markdownprocessor-api) | ||
| - [**Faster Markdown builds with Sätteri**](#faster-markdown-builds-with-sätteri) | ||
| - [**CDN cache providers for Cloudflare, Netlify, and Vercel**](#cdn-cache-providers-for-cloudflare-netlify-and-vercel) | ||
|
Princesseuh marked this conversation as resolved.
Resolved
|
||
| - [**Cloudflare helpers for advanced routing**](#cloudflare-helpers-for-advanced-routing) | ||
|
|
||
| To upgrade an existing project, use the automated `@astrojs/upgrade` CLI tool. Alternatively, upgrade manually by running the upgrade command for your package manager: | ||
|
|
||
| ```sh | ||
| # Recommended: | ||
| npx @astrojs/upgrade | ||
|
|
||
| # Manual: | ||
| npm install astro@latest | ||
| pnpm upgrade astro --latest | ||
| yarn upgrade astro --latest | ||
| ``` | ||
|
|
||
| ## New `markdown.processor` API | ||
|
|
||
| Astro's Markdown pipeline has always been built around [unified](https://unifiedjs.com/) (remark, rehype, and friends). That ecosystem is powerful, having thousands of plugins available, but perhaps it's not up to your taste. Astro 6.4 adds a new `markdown.processor` configuration option that lets you swap that pipeline out entirely. | ||
|
|
||
| The default processor is still `unified()`, so existing projects keep working without any changes. Your remark and rehype plugins continue to behave the same, but they are now configured directly on the processor, instead of in the top-level `markdown` config: | ||
|
|
||
| ```js title="astro.config.mjs" | ||
| import { defineConfig } from 'astro/config'; | ||
| import { unified } from '@astrojs/markdown-remark'; | ||
| import remarkToc from 'remark-toc'; | ||
|
|
||
| export default defineConfig({ | ||
| markdown: { | ||
| processor: unified({ | ||
| remarkPlugins: [remarkToc], | ||
| }), | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| The existing top-level `markdown.remarkPlugins`, `markdown.rehypePlugins`, `markdown.remarkRehype`, `markdown.gfm`, and `markdown.smartypants` options still work, but they're now deprecated in favor of passing them to `unified({...})`, and will be removed in Astro 8.0. | ||
|
Princesseuh marked this conversation as resolved.
Resolved
|
||
|
|
||
| For more information, see the updated [Markdown guide](https://docs.astro.build/en/guides/markdown-content/). | ||
|
|
||
| ## Faster Markdown builds with Sätteri | ||
|
|
||
| A pluggable processor API also means Astro can ship other Markdown processors. Astro 6.4 introduces a new `@astrojs/markdown-satteri` package, with a new processor based on [Sätteri](https://satteri.bruits.org/), a Markdown and MDX pipeline written in Rust. | ||
|
|
||
| Sätteri is much faster than the default unified-based pipeline, and it implements many Markdown features natively that previously required plugins. In our own testing, switching the Astro and Cloudflare docs site to Sätteri shaved over a minute off their respective build time. To try it out, install the package and set it as your processor: | ||
|
|
||
| ```sh | ||
| npm install @astrojs/markdown-satteri | ||
| ``` | ||
|
|
||
| ```js title="astro.config.mjs" | ||
| import { defineConfig } from 'astro/config'; | ||
| import { satteri } from '@astrojs/markdown-satteri'; | ||
|
|
||
| export default defineConfig({ | ||
| markdown: { | ||
| processor: satteri({ | ||
| features: { directive: true }, | ||
| }), | ||
| }, | ||
| }); | ||
| ``` | ||
|
|
||
| Sätteri doesn't run remark or rehype plugins. If you depend on plugins from the unified ecosystem, you'll need to either stay on `unified()` for now or port them to [Sätteri MDAST or HAST plugins](https://satteri.bruits.org/docs/plugins/). | ||
|
|
||
| We hope to make Sätteri the default Markdown processor in a future major version of Astro. To give feedback on the Rust processor and the new API, see the [Native Markdown / MDX RFC](https://github.com/withastro/roadmap/pull/1364). | ||
|
|
||
| ## Cloudflare helpers for advanced routing | ||
|
|
||
| If you're using [experimental advanced routing](https://docs.astro.build/en/reference/experimental-flags/advanced-routing/) (added in [Astro 6.3](/blog/astro-630/#experimental-advanced-routing)) on Cloudflare, `@astrojs/cloudflare` now ships a `cf()` helper that wires up the Cloudflare-specific bits for you: SESSION KV binding injection, static asset serving via the ASSETS binding, `locals.cfContext`, client address from `cf-connecting-ip`, `waitUntil`, and prerendered error pages. | ||
|
|
||
| With a custom fetch handler, use `cf()` from `@astrojs/cloudflare/fetch`: | ||
|
|
||
| ```ts title="src/app.ts" | ||
| import { astro, FetchState } from 'astro/fetch'; | ||
| import { cf } from '@astrojs/cloudflare/fetch'; | ||
|
|
||
| export default { | ||
| async fetch(request: Request, env: Env, ctx: ExecutionContext) { | ||
| const state = new FetchState(request); | ||
| const asset = await cf(state, env, ctx); | ||
| if (asset) return asset; | ||
| return astro(state); | ||
| }, | ||
| }; | ||
| ``` | ||
|
|
||
| With Hono, use `cf()` from `@astrojs/cloudflare/hono` as middleware. | ||
|
|
||
| ```ts title="src/app.ts" | ||
| import { Hono } from 'hono'; | ||
| import { actions, middleware, pages, i18n } from 'astro/hono'; | ||
| import { cf } from '@astrojs/cloudflare/hono'; | ||
|
|
||
| const app = new Hono<{ Bindings: Env }>(); | ||
|
|
||
| app.use(cf()); | ||
| app.use(actions()); | ||
| app.use(middleware()); | ||
| app.use(pages()); | ||
| app.use(i18n()); | ||
|
|
||
| export default app; | ||
| ``` | ||
|
|
||
| ## Other improvements | ||
|
|
||
| For a complete list of bug fixes and smaller improvements, see [the full changelog](https://github.com/withastro/astro/blob/main/packages/astro/CHANGELOG.md). | ||
|
|
||
| ## Community | ||
|
|
||
| The Astro core team is: | ||
|
|
||
| <Mention name="alex" />, <Mention name="armand" />, <Mention name="chris" />, | ||
| <Mention name="ema" />, | ||
| <Mention name="erika" />, <Mention name="florian" />, <Mention name="fred" />, | ||
| <Mention name="hideoo" />, | ||
| <Mention name="luiz" />, <Mention name="matt" />, <Mention name="matthew" />, | ||
| <Mention name="reuben" />, | ||
| <Mention name="sarah" />, and <Mention name="yan" />. | ||
|
|
||
| Thanks to all the other contributors who helped make Astro 6.4 possible with code and docs additions and improvements. | ||
|
Princesseuh marked this conversation as resolved.
Resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.