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.
npm install @zhouhua-dev/remark-media-card-gatsby --save-dev
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',
],
},
},
],
};