1
1
// @ts -check
2
2
// Note: type annotations allow type checking and IDEs autocompletion
3
3
4
- const lightCodeTheme = require ( ' prism-react-renderer/themes/github' ) ;
5
- const darkCodeTheme = require ( ' prism-react-renderer/themes/dracula' ) ;
4
+ const lightCodeTheme = require ( " prism-react-renderer/themes/github" ) ;
5
+ const darkCodeTheme = require ( " prism-react-renderer/themes/dracula" ) ;
6
6
7
7
/** @type {import('@docusaurus/types').Config } */
8
8
const config = {
9
- title : ' Write a JavaScript Compiler in Rust' ,
10
- url : ' https://boshen.github.io' ,
11
- baseUrl : ' /javascript-compiler-in-rust/' ,
12
- onBrokenLinks : ' throw' ,
13
- onBrokenMarkdownLinks : ' throw' ,
14
- onDuplicateRoutes : ' throw' ,
15
- organizationName : ' Boshen' , // Usually your GitHub org/user name.
16
- projectName : ' javascript-compiler-in-rust' , // Usually your repo name.
9
+ title : " Write a JavaScript Compiler in Rust" ,
10
+ url : " https://boshen.github.io" ,
11
+ baseUrl : " /javascript-compiler-in-rust/" ,
12
+ onBrokenLinks : " throw" ,
13
+ onBrokenMarkdownLinks : " throw" ,
14
+ onDuplicateRoutes : " throw" ,
15
+ organizationName : " Boshen" , // Usually your GitHub org/user name.
16
+ projectName : " javascript-compiler-in-rust" , // Usually your repo name.
17
17
i18n : {
18
- defaultLocale : 'en' ,
19
- locales : [ 'en' ] ,
18
+ defaultLocale : "en" ,
19
+ locales : [ "en" ] ,
20
20
} ,
21
21
presets : [
22
22
[
23
- ' classic' ,
23
+ " classic" ,
24
24
/** @type {import('@docusaurus/preset-classic').Options } */
25
25
( {
26
26
docs : {
27
- sidebarPath : require . resolve ( './sidebars.js' ) ,
28
- editUrl : 'https://github.com/Boshen/javascript-compiler-in-rust/tree/main/docs/' ,
27
+ sidebarPath : require . resolve ( "./sidebars.js" ) ,
28
+ editUrl :
29
+ "https://github.com/Boshen/javascript-compiler-in-rust/tree/main/docs/" ,
29
30
showReadingTime : true ,
30
31
} ,
31
32
blog : {
32
- editUrl : 'https://github.com/Boshen/javascript-compiler-in-rust/tree/main/blog' ,
33
+ editUrl :
34
+ "https://github.com/Boshen/javascript-compiler-in-rust/tree/main/blog" ,
33
35
showReadingTime : true ,
34
36
} ,
35
37
theme : {
36
- customCss : require . resolve ( ' ./src/css/custom.css' ) ,
38
+ customCss : require . resolve ( " ./src/css/custom.css" ) ,
37
39
} ,
38
40
} ) ,
39
41
] ,
@@ -42,31 +44,33 @@ const config = {
42
44
themeConfig :
43
45
/** @type {import('@docusaurus/preset-classic').ThemeConfig } */
44
46
( {
45
- metadata : [ { name : 'keywords' , content : 'rust, javascript, compiler, tutorial' } ] ,
47
+ metadata : [
48
+ { name : "keywords" , content : "rust, javascript, compiler, tutorial" } ,
49
+ ] ,
46
50
colorMode : {
47
- defaultMode : ' dark' ,
51
+ defaultMode : " dark" ,
48
52
} ,
49
53
navbar : {
50
- title : ' Home' ,
54
+ title : " Home" ,
51
55
items : [
52
56
{
53
- type : ' doc' ,
54
- docId : ' intro' ,
55
- position : ' left' ,
56
- label : ' Book' ,
57
+ type : " doc" ,
58
+ docId : " intro" ,
59
+ position : " left" ,
60
+ label : " Book" ,
57
61
} ,
58
- { to : ' /blog' , label : ' Tutorials' , position : ' left' } ,
62
+ { to : " /blog" , label : " Tutorials" , position : " left" } ,
59
63
{
60
- href : ' https://github.com/Boshen/javascript-compiler-in-rust' ,
61
- label : ' GitHub' ,
62
- position : ' right' ,
64
+ href : " https://github.com/Boshen/javascript-compiler-in-rust" ,
65
+ label : " GitHub" ,
66
+ position : " right" ,
63
67
} ,
64
68
] ,
65
69
} ,
66
70
prism : {
67
71
theme : lightCodeTheme ,
68
72
darkTheme : darkCodeTheme ,
69
- additionalLanguages : [ ' rust' ]
73
+ additionalLanguages : [ " rust" ] ,
70
74
} ,
71
75
} ) ,
72
76
} ;
0 commit comments