#MDX frontmatter layout variable forbidden to use ?

1 messages · Page 1 of 1 (latest)

burnt hill
#

Hi !

Sorry, might be wrong and it's mostly tied with MDX, but I can't define layout in MDX frontmatter and switch Astro layout, base on that variable. Is it something specific with MDX package or it's Astro hidden rock ?

Thank you !

Example :

---
title: First blog post
authors:
- TommyJ
description: "Hello"
type: "post"
layout: "blog"
---

It will work only with :

---
title: First blog post
authors:
- TommyJ
description: "Hello"
type: "post"
---

So, adding layout: "blog" to MDX will lead to error 👺

ruby slate