Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gentksb committed Aug 17, 2022
1 parent c4692e0 commit c9c4cf1
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 77 deletions.
3 changes: 3 additions & 0 deletions gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ const config: GatsbyConfig = {
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.md`, `.mdx`],
mdxOptions: {
remarkPlugins: [require(`remark-frontmatter`), require(`remark-gfm`)]
},
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
Expand Down
7 changes: 6 additions & 1 deletion gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ export const createPages: GatsbyNode["createPages"] = async ({
frontmatter {
title
}
internal {
contentFilePath
}
}
}
}
Expand Down Expand Up @@ -52,7 +55,9 @@ export const createPages: GatsbyNode["createPages"] = async ({

createPage({
path: post.node.fields.slug,
component: path.resolve(`./src/templates/blog-post.tsx`),
component: `${path.resolve(
`./src/templates/blog-post.tsx`
)}?__contentFilePath=${post.node.internal.contentFilePath}`,
context: {
slug: post.node.fields.slug,
previous,
Expand Down
Loading

0 comments on commit c9c4cf1

Please sign in to comment.