forked from Gusarich/housify-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
41 lines (37 loc) · 935 Bytes
/
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
import nextra from 'nextra';
import fs from 'fs';
import { getHighlighter, BUNDLED_LANGUAGES } from 'shiki';
const housify = JSON.parse(
fs.readFileSync('./grammars/housify.tmLanguage.json'),
'utf8',
);
const rehypePrettyCodeOptions = {
getHighlighter: (options) =>
getHighlighter({
...options,
langs: [
...BUNDLED_LANGUAGES,
{
id: 'Housify',
scopeName: 'source.hsf',
grammar: housify,
aliases: ['hsf', 'housify'],
},
],
}),
};
const withNextra = nextra({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.jsx',
latex: true,
defaultShowCopyCode: true,
mdxOptions: {
rehypePrettyCodeOptions,
},
});
export default withNextra({
output: 'export',
images: {
unoptimized: true,
},
});