a programming education platform
www.hypercommit.com
education
1import createMDX from "@next/mdx"
2
3import diffsDark from "./lib/shiki-themes/diffs-dark.json" with { type: "json" }
4import diffsLight from "./lib/shiki-themes/diffs-light.json" with { type: "json" }
5
6/** @type {import('rehype-pretty-code').Options} */
7const rehypePrettyCodeOptions = {
8 theme: { dark: diffsDark, light: diffsLight },
9 defaultLang: "plaintext",
10 keepBackground: false,
11}
12
13const withMDX = createMDX({
14 extension: /\.mdx?$/,
15 options: {
16 remarkPlugins: [["remark-gfm", {}]],
17 rehypePlugins: [["rehype-pretty-code", rehypePrettyCodeOptions]],
18 },
19})
20
21/** @type {import('next').NextConfig} */
22const nextConfig = {
23 pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
24 transpilePackages: ["@workspace/ui"],
25 devIndicators: false,
26}
27
28export default withMDX(nextConfig)