-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnext.config.js
60 lines (59 loc) · 1.16 KB
/
next.config.js
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
const { withContentlayer } = require('next-contentlayer');
module.exports = withContentlayer({
images: {
domains: [
'images-na.ssl-images-amazon.com',
'm.media-amazon.com',
'readwise-assets.s3.amazonaws.com',
'res.cloudinary.com',
],
},
trailingSlash: true,
headers() {
return [
{
source: '/api/rss.xml',
headers: [
{
key: 'content-type',
value: 'text/xml',
},
],
},
{
source: '/fonts/:path*',
headers: [
{
key: 'Cache-Control',
value: 'public, max-age=31536000, immutable',
},
],
},
];
},
async rewrites() {
return [
{
source: '/js/script-u.js',
destination: 'https://analytics.balla.dev/script.js',
},
{
source: '/rss.xml',
destination: '/api/rss.xml',
},
{
source: '/feed',
destination: '/api/rss.xml',
},
];
},
async redirects() {
return [
{
source: '/memos',
destination: '/writings?filter=memo',
permanent: false,
},
];
},
});