-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
105 lines (99 loc) · 2.48 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/** @type {import('next').NextConfig} */
const withMDX = require('@next/mdx')({
extension: /\.(md|mdx)$/,
options: {
remarkPlugins: [],
rehypePlugins: [],
},
})
// You can choose which headers to add to the list
// after learning more below.
const securityHeaders = [
//{
// key: 'X-DNS-Prefetch-Control',
// value: 'on',
//},
{
key: 'X-Frame-Options',
value: 'SAMEORIGIN',
},
//{
// key: 'X-Content-Type-Options',
// value: 'nosniff',
//},
]
const config = {
//poweredByHeader: false,
experimental: { esmExternals: true },
//reactStrictMode: true,
trailingSlash: true,
eslint: {
ignoreDuringBuilds: true,
},
images: {
domains: ['fra1.digitaloceanspaces.com', "www.cbsofyalioglu.com"],
deviceSizes: [640, 768, 1024, 1280, 1536, 1920],
minimumCacheTTL: 86400,
},
env: {
DOMAIN:
process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : 'https://webmeister.org',
},
// Prefer loading of ES Modules over CommonJS
// Support MDX files as pages:
pageExtensions: ['md', 'mdx', 'tsx', 'ts', 'jsx', 'js'],
// Support loading `.md`, `.mdx`:
webpack(config, options) {
config.module.rules.push({
test: /\.mdx?$/,
use: [
// The default `babel-loader` used by Next:
options.defaultLoaders.babel,
{
loader: '@mdx-js/loader',
/** @type {import('@mdx-js/loader').Options} */
options: {
/* jsxImportSource: …, otherOptions… */
remarkPlugins: [],
rehypePlugins: [],
},
},
],
})
return config
},
async redirects() {
return [
{
source: '/productivity/obsidian-app/',
destination: '/',
permanent: true,
},
{
source: '/en/content-creation-tools/',
destination: '/productivity/content-creation-tools/',
permanent: true,
},
{
source: '/en/content-creation-tools/',
destination: '/productivity/content-creation-tools/',
permanent: true,
},
//{
// source: "/blog-acmak/notion-ile-ucretsiz-web-sayfasi-olusturmak/",
// destination: "/blog-acmak/notion-sablonlari-ve-ucretsiz-site-olusturmak/",
// permanent:true
//}
]
},
async headers() {
return [
{
// Apply these headers to all routes in your application.
source: '/(.*)',
headers: securityHeaders,
},
]
},
}
module.exports = withMDX(config)