-
-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathnext.config.mjs
53 lines (48 loc) · 1.1 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
import nextMDX from '@next/mdx'
import { recmaPlugins } from './src/mdx/recma.mjs'
import { rehypePlugins } from './src/mdx/rehype.mjs'
import { remarkPlugins } from './src/mdx/remark.mjs'
import withSearch from './src/mdx/search.mjs'
const withMDX = nextMDX({
options: {
remarkPlugins,
rehypePlugins,
recmaPlugins,
},
})
/** @type {import('next').NextConfig} */
const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
async redirects() {
return [
{
source: '/github',
destination: 'https://git.new/syntax',
permanent: true,
},
{
source: '/discord',
destination: 'https://discord.com/invite/P8GXYyH3ZU',
permanent: true,
},
{
source: '/pro',
destination: 'https://pro.syntaxui.com/',
permanent: true,
},
]
},
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'ansubkhan.com',
},
{
protocol: 'https',
hostname: 'images.unsplash.com',
},
],
},
}
export default withSearch(withMDX(nextConfig))