-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
34 lines (31 loc) · 976 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const rehypePrism = require('@mapbox/rehype-prism');
const remarkSlug = require('remark-slug');
const withImages = require('next-images');
const IndexData = require('./data/IndexData');
const routeHandler = require('./utils/routeHandler');
const routes = routeHandler(IndexData);
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
hastPlugins: [
rehypePrism
],
remarkPlugins: [
remarkSlug,
]
}
});
module.exports = withImages(
withMDX({
exportTrailingSlash: true,
exportPathMap: () => {
return routes
},
pageExtensions: ['js', 'jsx', 'md', 'mdx'],
publicRuntimeConfig: {
FE_URL: process.env.FE_URL ? process.env.FE_URL : 'http://localhost:3000/',
GA_ID: process.env.GA_ID ? process.env.GA_ID : '',
AMPLITUDE_KEY: process.env.AMPLITUDE_KEY ? process.env.AMPLITUDE_KEY : '',
}
})
);