Skip to content

Frontmatter Rendered on Page #2349

Answered by shroommu
shroommu asked this question in Q&A
Sep 14, 2023 · 1 comments · 9 replies
Discussion options

You must be logged in to vote

WELL. Scratch that. Guess I finally pulled out the right hair.

Installed CRACO as recommended in the docs about CRA, downgraded remark-frontmatter to 3.0.0, and used this CRACO config file:

const { addAfterLoader, loaderByName } = require("@craco/craco");
const remarkFrontmatter = require("remark-frontmatter");

module.exports = {
  webpack: {
    configure: (webpackConfig) => {
      addAfterLoader(webpackConfig, loaderByName("babel-loader"), {
        test: /\.(md|mdx)$/,
        loader: require.resolve("@mdx-js/loader"),
        options: {
          providerImportSource: "@mdx-js/react",
          remarkPlugins: [remarkFrontmatter, { type: "yaml", marker: "-" }],
        },
      });

…

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@shroommu
Comment options

@ChristianMurphy
Comment options

@shroommu
Comment options

@shroommu
Comment options

Answer selected by ChristianMurphy
@ChristianMurphy
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants