deckgo / gatsby-remark-highlight-code

Adds stylish cards and syntax highlighting to code blocks in markdown files
MIT License
67 stars 18 forks source link

Update readme for gatsby-plugin-mdx #17

Closed mpmccauley closed 4 years ago

mpmccauley commented 4 years ago

Heyo! I really like the styling of these code blocks. Cool project!

For my website, I'm using gatsby-plugin-mdx instead of gatsby-transformer-remark.

I had no problem getting it to work, but it took me a few minutes to realize the gatsby-config.js needed to be tweaked slightly.

I would suggest adding a section to your readme for gatsby-plugin-mdx like this:

// In your gatsby-config.js
plugins: [
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [".mdx", ".md"],
        gatsbyRemarkPlugins: [
          {
            resolve: `gatsby-remark-highlight-code`,
            options: {
              terminal: "ubuntu",
            },
          },
        ],
      },
    },
]

Cheers, -Mike

peterpeterparker commented 4 years ago

Oh I didn't know that, thx the issue Mike 👍

Sure sounds like a good idea to add something about it the README. Can you provide a PR? I'll be happy to merge it :)

mpmccauley commented 4 years ago

:+1: