react.dev icon indicating copy to clipboard operation
react.dev copied to clipboard

Handle three gatsby-remark-prismjs warnings during build

Open stephyswe opened this issue 3 years ago • 0 comments
trafficstars

Is this a desired choice? To have generic code blocks in gatsby-remark-prismjs?

When running "yarn dev" the three following warnings occurs.

warn unable to find prism language 'sh' for highlighting. applying generic code block
warn unable to find prism language 'jsxon' for highlighting. applying generic code block
warn unable to find prism language 'console' for highlighting. applying generic code block

These warnings can be prevented by adding one line in gatsby-config.js on line 86.

'gatsby-remark-use-jsx',
          {
            resolve: 'gatsby-remark-prismjs',
            options: {
              classPrefix: 'gatsby-code-',
              aliases: {sh: 'bash', jsxon: 'jsx', console: 'bash'}, < ---
            },
          },

But maybe we want to generic code blocks?

stephyswe avatar Sep 15 '22 08:09 stephyswe