Skip to content

Instantly share code, notes, and snippets.

@Shwartz
Created August 26, 2019 03:39
Show Gist options
  • Save Shwartz/506dc080341336ac51fda3b8a48a0377 to your computer and use it in GitHub Desktop.
Save Shwartz/506dc080341336ac51fda3b8a48a0377 to your computer and use it in GitHub Desktop.
gatsbyjs remark images and mdx config example
const path = require("path")
module.exports = {
/* Your site config here */
siteMetadata: {
title: "Generic Site Title",
},
pathPrefix: `/gby1`,
plugins: [
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-sharp`,
`gatsby-plugin-sass`,
`gatsby-remark-images`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `src`,
path: path.join(__dirname, `src`, `md`),
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: path.join(__dirname, `static`, `images`),
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
extensions: [`.mdx`, `.md`],
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 500,
},
},
],
},
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment