-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
39 lines (34 loc) · 943 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
35
36
37
38
39
const jdown = require('jdown')
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
module.exports = {
webpack: function (config) {
config.module.rules.push({
test: /\.md$/,
use: 'raw-loader',
})
return config
},
env: {
SITE_NAME: 'Pande Muliada',
SITE_SHORT_DESCRIPTION: "Pande Muliada's personal blog",
},
exportTrailingSlash: true,
// exportPathMap: async function () {
// const paths = {
// '/': { page: '/' },
// '/posts': { page: '/posts' },
// }
// const content = await jdown('_posts') // get all markdown files in _posts directory
// Object.entries(content).forEach(([filename, fileContent]) => {
// paths[`/posts/${fileContent.slug}`] = {
// page: `/posts/[slug]`,
// query: {
// slug: fileContent.slug,
// },
// }
// })
// return paths
// },
}