Skip to content

Latest commit

 

History

History
61 lines (48 loc) · 1.4 KB

readme.en.md

File metadata and controls

61 lines (48 loc) · 1.4 KB

Remark Media Card Gatsby

npm version

中文 | English

Please refer to remark-media-card for the functionality and usage of this plugin. This project is just a wrapper designed to be compatible with the Gatsby framework.

Installation

npm install @zhouhua-dev/remark-media-card-gatsby --save-dev

Usage

If you are using the gatsby-transformer-remark plugin, add this plugin to the plugins array:

// gatsby-config.js
module.exports = {
  // Gatsby configuration
  plugins: [
    // Other plugins
    {
      resolve: 'gatsby-transformer-remark',
      options: {
        plugins: [
          '@zhouhua-dev/remark-media-card-gatsby',
          // Other gatsby-transformer-remark plugins
        ],
      },
    },
  ],
};

If you are using the gatsby-plugin-mdx plugin, add this plugin to gatsbyRemarkPlugins:

// gatsby-config.js
module.exports = {
  // Gatsby configuration
  plugins: [
    // Other plugins
    {
      resolve: 'gatsby-plugin-mdx',
      options: {
        gatsbyRemarkPlugins: [
          '@zhouhua-dev/remark-media-card-gatsby',
        ],
      },
    },
  ],
};

demo

blog