-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.mjs
83 lines (80 loc) · 1.75 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// @ts-check
import withPlaiceholder from "@plaiceholder/next";
/** @type {import('next').NextConfig} */
export const config = {
reactStrictMode: true,
experimental: {
webpackBuildWorker: true,
},
images: {
remotePatterns: [
{
hostname: "**.maximousblk.me",
protocol: "https",
},
{
hostname: "s3.us-west-2.amazonaws.com",
protocol: "https",
port: "",
pathname: "/secure.notion-static.com/**",
},
{
hostname: "images.weserv.nl",
protocol: "https",
},
{
hostname: "cdn.jsdelivr.net",
protocol: "https",
},
],
minimumCacheTTL: 3600,
},
async rewrites() {
return [
{
source: "/feed",
destination: "/api/feed",
},
{
source: "/feed/:format*",
destination: "/api/feed?f=:format*",
},
{
source: "/sitemap.xml",
destination: "/sitemap",
},
{
source: "/robots.txt",
destination: "/.well-known/robots.txt",
},
{
source: "/_umami/:path*",
destination: "https://analytics.maximousblk.me/:path*",
},
{
source: "/_umami_cloud/:path*",
destination: "https://analytics.umami.is/:path*",
},
];
},
async redirects() {
return [
{
source: "/post/:path*",
destination: "/posts/:path*",
permanent: true,
},
{
source: "/pgp",
destination: "https://keybase.io/maximousblk/pgp_keys.asc",
permanent: false,
},
{
source: "/sponsor",
destination: "/~https://github.com/sponsors/maximousblk",
permanent: true,
},
];
},
};
export default withPlaiceholder(config);