Git Product home page Git Product logo

Comments (6)

ibqn avatar ibqn commented on June 3, 2024 7

@iloveip, my solution is to use remark-emoji plugin instead directly.

const gatsbyRemarkPlugins = [
  ...
]

module.exports = {
  ...
  plugins: [
    ...
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        ...
        gatsbyRemarkPlugins,
        remarkPlugins: [require(`remark-emoji`)],
      },
    },
  ],
...
}

Here is the reference to the gatsby docs. https://www.gatsbyjs.org/docs/mdx/plugins/#remark-plugins

from gatsby-remark-emojis.

matchilling avatar matchilling commented on June 3, 2024

Hi @ibqn, thanks for submitting this issue 🙏. I haven't used the gatsby-plugin-mdx plugin, but it might be the case that the standard Gatsby lifecycle rendering methods differ and that gatsby-remark-emojis isn't actually being called.

Did you get any error logs?

[Off-topic]: What's the benefit of using .mdx compared to standard code blocks in Markdown?

from gatsby-remark-emojis.

iloveip avatar iloveip commented on June 3, 2024

Hi there,
I have the same problem. I'm also using mdx, and can't get this plugin to work. Is there any way to fix it?

from gatsby-remark-emojis.

ibqn avatar ibqn commented on June 3, 2024

@matchilling
to your off-topic question: The benefit for me is that I can include react components additionally to the markdown blocks, which gives me an a rich range of possibilities.

For example:

# Header

body text

<ContanctMe />

## why shout you use this option to contact me

or what so ever

Thus, you can use mdx to create your some pages, in addition to blog posts.

from gatsby-remark-emojis.

iloveip avatar iloveip commented on June 3, 2024

@ibqn Thank you very much!

from gatsby-remark-emojis.

AurelienDud avatar AurelienDud commented on June 3, 2024

@iloveip, my solution is to use remark-emoji plugin instead directly.

const gatsbyRemarkPlugins = [
  ...
]

module.exports = {
  ...
  plugins: [
    ...
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        ...
        gatsbyRemarkPlugins,
        remarkPlugins: [require(`remark-emoji`)],
      },
    },
  ],
...
}

Here is the reference to the gatsby docs. https://www.gatsbyjs.org/docs/mdx/plugins/#remark-plugins

But that solution produce another issue about ESM support and so this leads to adding fixes to the fixes.
Actually just gatsby-remark-emojis doesn't work with gatsby-plugin-mdx.
Hope a reliable solution will be found :)

from gatsby-remark-emojis.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.