From 711505689f1a34fba9f73a0cde50fd98b59a1b96 Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Tue, 21 May 2019 13:47:20 +0200 Subject: [PATCH] Fix MDX v1 remark/rehype plugin loading after migration During the migration to MDX 1.0.0 (1) in GH-137 the now deprecated (2) `mdPlugins` and `hastPlugins` options were not replaced with their (new named) respective equivalents `remarkPlugins` and `rehypePlugins`. Even if the documentation states that the options will be removed in v2 and are still supported (only showing a warning in the console when still used), the defined plugins were not loaded anymore causing e.g. no more automatic generation of `id` attributes for headers in MDX content. Therefore, to finish 100% of the migration, both options have been renamed. References: (1) https://mdxjs.com/blog/v1 (2) https://mdxjs.com/blog/v1#deprecations GH-144 --- .gatsby/plugins/mdx.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gatsby/plugins/mdx.js b/.gatsby/plugins/mdx.js index a49f2d0d..e2380f58 100644 --- a/.gatsby/plugins/mdx.js +++ b/.gatsby/plugins/mdx.js @@ -34,6 +34,6 @@ module.exports = { }, footnotes: true, gatsbyRemarkPlugins: [], - hastPlugins: [rehypeSlug], - mdPlugins: [remarkBreaks, [remarkGitHub, remarkGitHubOptions]] + rehypePlugins: [rehypeSlug], + remarkPlugins: [remarkBreaks, [remarkGitHub, remarkGitHubOptions]] };