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

Plugin doesnt work in gatsby v5 #66

@harikrishkk

Description

@harikrishkk

I was creating a coding blog website and wanted to integrate this highlight plugin.
I tried the steps mentioned in the plugin's GitHub documentation. I tried this on a sample hello world first before integrating this into a full-blown one.

I already had gatsby-plugin-mdx installed, so was not looking to install the gatsby-transformer-remark just for this one.
A hello world implementation on a sample gatsby site would have helped people a lot.
While the plugin looks awesome, the documentation could equal that with a few live working docs.

I was able to get the same working with gatsby-remark-prismjs but was curious about using this plugin instead.

Here is a hello world gatsby v5 website which I am trying to integrate this plugin.

Steps already tried:

install npm install --save gatsby-transformer-remark gatsby-remark-highlight-code @deckdeckgo/highlight-code

add the same in gatsby config

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

Tried loading this in index.js, components

import { defineCustomElements as deckDeckGoHighlightElement } from "@deckdeckgo/highlight-code/dist/loader";
deckDeckGoHighlightElement();

Any pointers help!

Thanks in advance,
Hari

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions