Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
Experiment with configuring gatsby-plugin-mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
jcxldn committed Oct 2, 2023
1 parent 4693b10 commit 29b42cc
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 2 deletions.
11 changes: 10 additions & 1 deletion gatsby-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import type { GatsbyConfig, PluginRef } from "gatsby";

import childProcess from "child_process";

import remarkToc from "remark-toc";

import ResolvePagesParams from "./src/types/gatsby-config/resolvePagesParams";
import Page from "./src/types/gatsby-config/page";

Expand Down Expand Up @@ -209,7 +211,14 @@ const config: GatsbyConfig = {
`gatsby-plugin-sharp`,
`gatsby-transformer-sharp`, // Needed for dynamic images
`gatsby-plugin-no-sourcemaps`,
`gatsby-plugin-mdx`,
{
resolve: `gatsby-plugin-mdx`,
options: {
mdxOptions: {
remarkPlugins: [[remarkToc, { heading: "contents", maxDepth: 1 }]],
},
},
},
`gatsby-transformer-genetic-sequences`, // Custom plugin to parse gb, fasta files.
`gatsby-plugin-pnpm`, // configure webpack for pnpm dependency resolution
`gatsby-plugin-postcss`, // for TailwindCSS for nested menu on src/pages/visualiser.tsx
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"gatsby-plugin-manifest": "^5.12.0",
"gatsby-plugin-mdx": "^5.12.0",
"gatsby-plugin-no-sourcemaps": "^5.12.0",
"gatsby-plugin-postcss": "^6.12.0",
"gatsby-plugin-pnpm": "^1.2.10",
"gatsby-plugin-postcss": "^6.12.0",
"gatsby-plugin-preact": "^7.12.0",
"gatsby-plugin-remote-images": "^3.6.6",
"gatsby-plugin-sharp": "^5.12.0",
Expand All @@ -58,6 +58,7 @@
"gatsby-yaml-full-markdown": "^5.0.1",
"postcss": "^8.4.31",
"prettier": "^3.0.3",
"remark-toc": "^9.0.0",
"tailwindcss": "^3.3.3",
"typescript": "^5.2.2",
"webpack-stats-plugin": "^1.1.3"
Expand Down
67 changes: 67 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 29b42cc

Please sign in to comment.