/[sudobot]/trunk/docs/next.config.mjs
ViewVC logotype

Annotation of /trunk/docs/next.config.mjs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 626 - (hide annotations)
Sat Sep 7 09:38:45 2024 UTC (6 months, 3 weeks ago) by rakinar2
File MIME type: text/javascript
File size: 1383 byte(s)
chore: sync with git

1 rakinar2 575 import createMDX from "@next/mdx";
2     import rehypeAutolinkHeadings from "rehype-autolink-headings";
3 rakinar2 626 import rehypePrettyCode from "rehype-pretty-code";
4 rakinar2 575 import rehypeSlug from "rehype-slug";
5     import remarkFrontmatter from "remark-frontmatter";
6     import remarkGfm from "remark-gfm";
7     import remarkMdxFrontmatter from "remark-mdx-frontmatter";
8    
9     /** @type {import('next').NextConfig} */
10     const nextConfig = {
11     pageExtensions: ["js", "jsx", "mdx", "ts", "tsx", "md"],
12     async rewrites() {
13     return [{ source: "/:path*.(mdx?)", destination: "/:path*" }];
14     },
15     };
16    
17 rakinar2 626 /** @type {import('rehype-pretty-code').Options} */
18     const rehypePrettyCodeOptions = {
19     theme: "material-theme-ocean",
20     };
21    
22 rakinar2 575 const withMDX = createMDX({
23     extension: /\.mdx?$/,
24     options: {
25     remarkPlugins: [
26     remarkGfm,
27     remarkFrontmatter,
28     [remarkMdxFrontmatter, { name: "metadata" }],
29     ],
30     rehypePlugins: [
31     rehypeSlug,
32     [
33     rehypeAutolinkHeadings,
34     {
35     behavior: "append",
36     properties: { className: "autolink", tabindex: -1 },
37     },
38     ],
39 rakinar2 626 [rehypePrettyCode, rehypePrettyCodeOptions],
40 rakinar2 575 ],
41     },
42     webpack(config) {
43     require("./generate-sitemap.js");
44     return config;
45     },
46     });
47    
48     export default withMDX(nextConfig);

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26