Skip to content

Commit 0f83aae

Browse files
author
tkokhing
committed
major revamp, next.config is now mjs, rehype-pretty-code, shiki, next/mdx is now ^16.1.1 redesigned CLI colour w USER-INPUT or o/p file
1 parent fbcf579 commit 0f83aae

8 files changed

Lines changed: 667 additions & 272 deletions

File tree

next.config.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

next.config.mjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
// next.config.mjs
3+
import createMDX from "@next/mdx";
4+
import remarkGfm from "remark-gfm";
5+
import rehypePrettyCode from "rehype-pretty-code";
6+
7+
/** @type {import('rehype-pretty-code').Options} */
8+
const prettyOptions = {
9+
theme: "github-dark",
10+
keepBackground: true,
11+
};
12+
13+
const withMDX = createMDX({
14+
extension: /\.mdx?$/,
15+
options: {
16+
remarkPlugins: [remarkGfm],
17+
rehypePlugins: [[rehypePrettyCode, prettyOptions]],
18+
},
19+
});
20+
21+
/** @type {import('next').NextConfig} */
22+
const nextConfig = {
23+
// turn off mdxRs for plugin support
24+
experimental: { mdxRs: false },
25+
pageExtensions: ["js", "jsx", "md", "mdx", "ts", "tsx"],
26+
output: "export",
27+
distDir: "dist",
28+
images: { unoptimized: true },
29+
};
30+
31+
export default withMDX(nextConfig);

0 commit comments

Comments
 (0)