The knowledge sources you provided don’t include Nuxt Content’s front‑matter mapping rules, so I can’t confirm the exact intended behavior from the official docs.
From what is documented, Nuxt uses a meta object in several places for route/page metadata (definePageMeta → route.meta, etc.). [Page metadata; definePageMeta meta] This suggests that putting additional, non-core fields under a meta key is a common pattern in Nuxt, but the provided sources do not explicitly state that Nuxt Content 2 front‑matter is intentionally nested under $doc.meta.
So:
- Your observation that
customVariable is available as $doc.meta.customVariable is consistent with Nuxt’s general use of meta objects.
- However, I cannot confirm from these sources whether this is the documented, intended Nuxt Content 2 behavior or just an implementation detail that the current Content docs don’t clearly describe.
Given that gap, the safest assumption (based only on these sources) is:
- Access your custom front‑matter via
$doc.meta.customVariable.
- Treat this as aligned with Nuxt’s broader “meta” convention, but be aware the specific Nuxt Content behavior is not clearly covered in the docs we have here.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: