qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Frontmatter key in head context is not populated

Open voluntadpear opened this issue 1 year ago • 1 comments

Qwik Version

0.11.1

Operating System (or Browser)

macOS

Node Version (if applicable)

16.14.2

Which component is affected?

Qwik City

Expected Behaviour

https://github.com/BuilderIO/qwik/pull/1580 landed populating the head context with arbitrary keys from the frontmatter defined in MDX routes.

Thus, a frontmatter key was introduced as part of the head context that should contain these arbitrary values.

Actual Behaviour

Check the following StackBlitz: https://stackblitz.com/edit/qwik-starter-xnspel?file=src%2Froutes%2Fmy-markdown%2Findex.mdx,src%2Froutes%2Findex.tsx,src%2Fcomponents%2Fpost-heading.tsx.

Navigating to the /my-markdown route renders a JSON representation of the head state. Notice how the frontmatter key is empty although if you check the routes/my-markdown/index.mdx route, you'll notice that it introduces a few custom frontmatter keys.

Additional Information

No response

voluntadpear avatar Oct 16 '22 23:10 voluntadpear