Fix Astro 7's False markdown.gfm Deprecation Warning

A terminal window showing the real Astro warning: markdown.gfm and markdown.smartypants are deprecated, printed by the Container API even though the project never set either option
On this page

Why the warning fires with no matching config

Astro validates markdown.gfm and markdown.smartypants against a project’s config to print this deprecation warning only when a reader actually set one of them. The Container API’s AstroContainer.create() and createFromManifest() methods broke that check. They passed Astro’s internal ASTRO_CONFIG_DEFAULTS, which already sets gfm: true and smartypants: true as baseline defaults, straight into the same validation function normal builds use.

The validator can’t tell a default value from a value a reader actually typed into astro.config.mjs. Every Container API render saw gfm: true and treated it as user-set, so the warning fired unconditionally. Issue #17206, opened 2026-06-26 against astro@7.0.3, reproduces this with the Container API rendering MDX content.

A real bug, not a hint to change your config

Nothing about this warning pointed at an actual problem. It fired identically whether a project set gfm/smartypants or left them untouched, which is exactly what made it confusing to debug: there was no config change that made it stop.

Is this still a problem on Astro 7 today?

No. PR #17261 fixed it, merged 2026-07-01, shipped in astro@7.0.6. The fix strips gfm and smartypants out of the defaults object before it reaches the validator, so the Container API now validates a reader’s raw config the same way a normal build already did.

Container API render on astro@7.0.3 - 7.0.5
[astro] `markdown.gfm` and `markdown.smartypants` are deprecated. Move them
onto your processor instead (e.g. `satteri({ features: { gfm: false,
smartPunctuation: false } })`, or `unified({ gfm: false, smartypants: false })`
from `@astrojs/markdown-remark`). Will be removed in a future major.

There’s no config change to make on your end. Updating astro to 7.0.6 or later removes the false positive completely.

fix: update past the patched version
npm install astro@latest

Confirmed version range

This site runs astro@^7.1.3, well past the 7.0.6 fix, and doesn’t use the Container API anywhere in its own source, so it never hit this specific warning. If you’re rendering MDX through AstroContainer and see this exact message on astro@7.0.3 through 7.0.5, it’s this bug, not a real deprecation to act on. Anyone genuinely migrating markdown.gfm/markdown.smartypants off deprecated top-level keys should follow the markdown.rehypePlugins deprecation fix instead, which covers the real version of this migration.

Browse more fixes from this same upgrade in the Guides & Fixes archive.

Frequently asked

Does setting markdown.gfm: false or smartypants: false in my config stop this warning?

No, and that's the confusing part. This version of the warning fires from Container API rendering even when your config never mentions gfm or smartypants at all. There's nothing to remove from your own config, since the false positive comes from Astro's own default values, not yours.

Is this the same warning as the markdown.rehypePlugins deprecation warning?

Same general deprecation system, different keys and a different trigger. The rehypePlugins warning fires because a project genuinely sets that option, and the plugins keep working. This one fires on gfm and smartypants even when a project sets neither, and it was a real Astro bug, not a signal to change anything.

Emitted as FAQPage JSON-LD from the same frontmatter — one source, no duplicated prose.

Recent posts

Full-text search via Pagefind · ↑↓ to navigate · ↵ to open