Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.

How can I use this with pages? #1

Open
muuvmuuv opened this issue Jul 1, 2020 · 1 comment
Open

How can I use this with pages? #1

muuvmuuv opened this issue Jul 1, 2020 · 1 comment

Comments

@muuvmuuv
Copy link

muuvmuuv commented Jul 1, 2020

I am happy someone else also had this problem. For blog posts with gatsby-source-filesystem this is working great but not for mdx pages inside src/pages.

With the graphiql GUI I can see the parsed MDX frontmatter but somehow it is not passed to pageCOntext in my default template.

@muuvmuuv
Copy link
Author

muuvmuuv commented Jul 1, 2020

This returns the correct mdx in graphiql query when doing allSitePages:

  createTypes(`
    type SitePageContext implements Node {
      frontmatter: MdxFrontmatter
    }

    type MdxFrontmatter {
      title: String @mdx
    }
  `)

but still not in my default template :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant