/[sudobot]/branches/9.x-dev/docs/next.config.mjs
ViewVC logotype

Contents of /branches/9.x-dev/docs/next.config.mjs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 577 - (show annotations)
Mon Jul 29 18:52:37 2024 UTC (8 months ago) by rakinar2
File MIME type: text/javascript
File size: 1191 byte(s)
chore: add old version archive branches (2.x to 9.x-dev)
1 import rehypePrism from "@mapbox/rehype-prism";
2 import createMDX from "@next/mdx";
3 import rehypeAutolinkHeadings from "rehype-autolink-headings";
4 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"],
12 async rewrites() {
13 return [{ source: "/:path*.(mdx?)", destination: "/:path*" }];
14 },
15 };
16
17 const withMDX = createMDX({
18 options: {
19 remarkPlugins: [
20 remarkGfm,
21 remarkFrontmatter,
22 [remarkMdxFrontmatter, { name: "metadata" }],
23 ],
24 rehypePlugins: [
25 rehypeSlug,
26 [
27 rehypeAutolinkHeadings,
28 {
29 behavior: "append",
30 properties: { className: "autolink", tabindex: -1 },
31 },
32 ],
33 rehypePrism,
34 ],
35 },
36 webpack(config) {
37 require("./generate-sitemap.js");
38 return config;
39 },
40 });
41
42 export default withMDX(nextConfig);

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26