@lekoarts/gatsby-theme-jodie-core
Version:
Core Theme for @lekoarts/gatsby-theme-jodie. This theme implements the Project interface and exports templates (+ queries) which you can shadow.
41 lines (37 loc) • 890 B
JavaScript
import remarkGfm from "remark-gfm"
import { withDefaults } from "./utils/default-options.mjs"
const config = (themeOptions) => {
const options = withDefaults(themeOptions)
return {
plugins: [
{
resolve: `gatsby-source-filesystem`,
options: {
name: options.projectsPath,
path: options.projectsPath,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: options.pagesPath,
path: options.pagesPath,
},
},
options.mdx && {
resolve: `gatsby-plugin-mdx`,
options: {
mdxOptions: {
remarkPlugins: [remarkGfm],
},
},
},
`gatsby-transformer-sharp`,
options.sharp && {
resolve: `gatsby-plugin-sharp`,
options: {},
},
].filter(Boolean),
}
}
export default config