From f399518599c30b07a16b225d0adfb295a3b328bb Mon Sep 17 00:00:00 2001 From: CanRau Date: Thu, 12 Dec 2019 19:41:01 -0500 Subject: [PATCH] feat(MainLayout): add MdxTranslations & mdx homepage --- src/components/MainLayout/fragments.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/components/MainLayout/fragments.js b/src/components/MainLayout/fragments.js index f9a0ed0..63ae95e 100644 --- a/src/components/MainLayout/fragments.js +++ b/src/components/MainLayout/fragments.js @@ -126,7 +126,7 @@ export const Fragments = graphql` } fragment homepage on Query { - homepage: javascriptFrontmatter( + homepage: mdx( frontmatter: { lang: { eq: $lang }, layout: { eq: "HomePage" } } ) { fields { @@ -181,4 +181,24 @@ export const Fragments = graphql` } } } + + fragment MdxTranslations on Mdx { + fields { + translations { + id + lc + title + titleShort + to + fields { + url + } + frontmatter { + title + lang + slug + } + } + } + } `