Skip to content

Commit 7c72708

Browse files
committed
chore: add back remark for md content
1 parent cdba772 commit 7c72708

10 files changed

+1059
-79
lines changed

gatsby-config.ts

+21-13
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ require('dotenv').config({
1010

1111
const siteUrl = process.env.SITE_URL || `https://example.com`;
1212

13+
const remarkPlugins = [
14+
'gatsby-remark-copy-linked-files',
15+
{
16+
resolve: 'gatsby-remark-images',
17+
options: {
18+
maxWidth: 1140,
19+
quality: 90,
20+
linkImagesToOriginal: false,
21+
},
22+
},
23+
'gatsby-remark-autolink-headers',
24+
];
25+
1326
const configuration: GatsbyConfig = {
1427
pathPrefix: process.env.PATH_PREFIX || '/',
1528
siteMetadata: {
@@ -47,19 +60,14 @@ const configuration: GatsbyConfig = {
4760
{
4861
resolve: 'gatsby-plugin-mdx',
4962
options: {
50-
extensions: [`.md`, `.mdx`],
51-
gatsbyRemarkPlugins: [
52-
'gatsby-remark-copy-linked-files',
53-
{
54-
resolve: 'gatsby-remark-images',
55-
options: {
56-
maxWidth: 1140,
57-
quality: 90,
58-
linkImagesToOriginal: false,
59-
},
60-
},
61-
'gatsby-remark-autolink-headers',
62-
],
63+
extensions: [`.mdx`],
64+
gatsbyRemarkPlugins: remarkPlugins,
65+
},
66+
},
67+
{
68+
resolve: 'gatsby-transformer-remark',
69+
options: {
70+
plugins: remarkPlugins,
6371
},
6472
},
6573
{

0 commit comments

Comments
 (0)