-
Notifications
You must be signed in to change notification settings - Fork 47
/
next.config.mjs
60 lines (55 loc) · 1.32 KB
/
next.config.mjs
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import nextMdx from "@next/mdx"
import { rehypePlugins, remarkPlugins } from "./app/utils/mdxPlugins.mjs"
const withMDX = nextMdx({
options: {
remarkPlugins,
rehypePlugins,
},
})
/** @type {import('next').NextConfig} */
const config = {
pageExtensions: ["ts", "tsx", "js", "jsx", "md", "mdx"],
experimental: {
optimizePackageImports: ["@p5-wrapper/next", "@p5-wrapper/react"],
},
redirects() {
return [
{
source: "/animate",
permanent: true,
destination: "https://animate.style/",
},
{
source: "/baseline",
permanent: true,
destination: "https://github.com/daneden/Baseline.js",
},
{
source: "/books(.*)",
permanent: true,
destination: "/playlist$1",
},
{
source: "/toast",
permanent: true,
destination: "https://daneden.github.io/Toast/",
},
{
source: "/images/favicon.ico",
permanent: true,
destination: "/images/favicon.png",
},
{
source: "/:year(\\d+)/:month(\\d+)?/:day(\\d+)?/:title(.*)",
permanent: true,
destination: "/blog/:year/:title",
},
{
source: "/rss.xml",
permanent: true,
destination: "/feed.xml",
},
]
},
}
export default withMDX(config)