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

My code doesn't highlight. #59

Closed
berkaydagdeviren opened this issue Nov 3, 2022 · 1 comment
Closed

My code doesn't highlight. #59

berkaydagdeviren opened this issue Nov 3, 2022 · 1 comment

Comments

@berkaydagdeviren
Copy link

Hello, I suppose I followed README and steps but I can't get it to work. In the console it is giving me correct classes, I assume.

<pre>
<code class="lang-javascript"> console.log('hello')</code>
</pre>

And this is my gatsby-config file

module.exports = {
  siteMetadata: {
    title: `My Online Portfolio`,
    description: `my home on the web`,
    siteUrl: `https://evilsaint.cloud`,
    social: {
      twitter: `https://twitter.com/_EvilSaint_`
    },
  },
  plugins: [
  `gatsby-plugin-image`, 
  `gatsby-plugin-sitemap`,
  'gatsby-transformer-remark',
  'gatsby-remark-highlight-code',
  'gatsby-plugin-mdx',
  `gatsby-plugin-sharp`, 
  `gatsby-transformer-sharp`,
  {
    resolve: `gatsby-transformer-remark`,
    options: {
      plugins: [
        {
          resolve: `gatsby-remark-highlight-code`,
          options: {
            terminal: 'carbon'
          }
        },
      ],
    },
  },
  {
    resolve: `gatsby-plugin-mdx`,
    options: {
      extensions: [".mdx", ".md"],
      gatsbyRemarkPlugins: [
        {
          resolve: `gatsby-remark-highlight-code`,
          options: {
            terminal: 'carbon'
          }
        },
      ],
    },
  },
  {
    resolve: 'gatsby-source-filesystem',
    options: {
      "name": "images",
      "path": "./src/images/"
    },
    __key: "images"
  },
  {
    resolve: 'gatsby-source-filesystem',
    options: {
      "name": "pages",
      "path": "./src/pages/"
    },
    __key: "pages"
  },
  {
    resolve: 'gatsby-source-filesystem',
    options: {
      "name": `blogs`,
      "path": `${__dirname}/src/blog/`,
    },
    __key: "blogs"
  },  
]
};

I alos installed gatsby-remark-highlight-code as a dependency. I'm really lost can you help me out?

@peterpeterparker
Copy link
Contributor

Sorry totally forgot to answer. I hope you were able to the solve the issue or found another highlighter that suits your need.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants