feat: Implement mdx

This commit is contained in:
dfireBird
2020-08-08 16:47:43 +05:30
parent 7e3565e78a
commit abf609d09f
14 changed files with 1735 additions and 1448 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ exports.onCreateNode = async ({ node, getNode, actions }) => {
const { createPage, createNodeField } = actions
// TODO: find a better way to avoid handling non-resources
// or better, attach authors to what-is archives
if (node.internal.type === "MarkdownRemark" && node.frontmatter.authors) {
if (node.internal.type === "Mdx" && node.frontmatter.authors) {
const { frontmatter } = node
const isDoc = Boolean(!frontmatter.path)