`layout` property still treated as special in content collection with `deferRender`
Author: AlanBreckCreated Sep 29, 2026Updated Sep 29, 2026
Labelspkg: astro- P2: has workaroundtriage: fix pending
Astro Info
Astro v7.3.3
Node v24.15.0
System macOS (arm64)
Package Manager pnpm
Output static
Adapter none
Integrations noneIf this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
I'm migrating a site that used to use layout: ... in the frontmatter, but all of them are being accessed via a content collection. When I use deferRender: true, though, I'm getting an error: Rolldown failed to resolve import "demo" ('demo' being the layout name). This seems to contradict the docs:
This is not recognized as a special property when using content collections to query and render your content. https://docs.astro.build/en/basics/layouts/#markdown-layouts
What's the expected result?
layout frontmatter property has no effect in a content collection.
Link to Minimal Reproducible Example
https://github.com/AlanBreck/astro-layout-repro
Participation
- I am willing to submit a pull request for this issue.
Source: withastro/astro