forked from open-metadata/docs-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
43 lines (42 loc) · 1.02 KB
/
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
40
41
42
43
const withMarkdoc = require("@markdoc/next.js");
const fs = require("fs");
module.exports =
withMarkdoc(/* config: https://markdoc.io/docs/nextjs#options */)({
images: {
remotePatterns: [
{
protocol: "https",
hostname: "cdn.hashnode.com",
port: "",
},
],
},
webpack: (configuration) => {
configuration.module.rules.push(
{
test: /\.svg$/,
use: ["@svgr/webpack", "file-loader"],
},
{
test: /\.md$/,
use: "frontmatter-markdown-loader",
},
{
test: /\.ya?ml$/,
// use: 'js-yaml-loader',
use: "raw-loader", // Use raw-loader to load YAML as a string to preserve comments
}
);
return configuration;
},
async exportPathMap(defaultPathMap) {
return {
...defaultPathMap,
};
},
pageExtensions: ["js", "jsx", "ts", "tsx", "md", "mdoc"],
i18n: {
locales: ["en"],
defaultLocale: "en",
},
});