-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
43 lines (41 loc) · 1.03 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
import nextra from 'nextra'
import { getHighlighter } from 'shiki'
import { readFileSync } from 'fs'
const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
staticImage: true,
latex: true,
flexsearch: true,
defaultShowCopyCode: true,
mdxOptions: {
rehypePrettyCodeOptions: {
theme: {
dark: JSON.parse(readFileSync('./public/syntax/arctis_dark.json', 'utf-8')),
light: JSON.parse(readFileSync('./public/syntax/arctis_light.json', 'utf-8')),
},
getHighlighter: options => getHighlighter({
...options,
langs: [
{
id: 'terbium',
scopeName: 'source.terbium',
aliases: ['tb', 'trb'],
path: '../../public/syntax/terbium.tmLanguage.json',
},
'shell'
]
})
}
},
})
export default withNextra({
reactStrictMode: true,
eslint: {
// Eslint behaves weirdly in this monorepo.
ignoreDuringBuilds: true
},
experimental: {
optimizeCss: true,
},
})