11// @ts -check
22// Note: type annotations allow type checking and IDEs autocompletion
33
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" ) ;
66
77/** @type {import('@docusaurus/types').Config } */
88const 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.
1717 i18n : {
18- defaultLocale : 'en' ,
19- locales : [ 'en' ] ,
18+ defaultLocale : "en" ,
19+ locales : [ "en" ] ,
2020 } ,
2121 presets : [
2222 [
23- ' classic' ,
23+ " classic" ,
2424 /** @type {import('@docusaurus/preset-classic').Options } */
2525 ( {
2626 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/" ,
2930 showReadingTime : true ,
3031 } ,
3132 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" ,
3335 showReadingTime : true ,
3436 } ,
3537 theme : {
36- customCss : require . resolve ( ' ./src/css/custom.css' ) ,
38+ customCss : require . resolve ( " ./src/css/custom.css" ) ,
3739 } ,
3840 } ) ,
3941 ] ,
@@ -42,31 +44,33 @@ const config = {
4244 themeConfig :
4345 /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
4446 ( {
45- metadata : [ { name : 'keywords' , content : 'rust, javascript, compiler, tutorial' } ] ,
47+ metadata : [
48+ { name : "keywords" , content : "rust, javascript, compiler, tutorial" } ,
49+ ] ,
4650 colorMode : {
47- defaultMode : ' dark' ,
51+ defaultMode : " dark" ,
4852 } ,
4953 navbar : {
50- title : ' Home' ,
54+ title : " Home" ,
5155 items : [
5256 {
53- type : ' doc' ,
54- docId : ' intro' ,
55- position : ' left' ,
56- label : ' Book' ,
57+ type : " doc" ,
58+ docId : " intro" ,
59+ position : " left" ,
60+ label : " Book" ,
5761 } ,
58- { to : ' /blog' , label : ' Tutorials' , position : ' left' } ,
62+ { to : " /blog" , label : " Tutorials" , position : " left" } ,
5963 {
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" ,
6367 } ,
6468 ] ,
6569 } ,
6670 prism : {
6771 theme : lightCodeTheme ,
6872 darkTheme : darkCodeTheme ,
69- additionalLanguages : [ ' rust' ]
73+ additionalLanguages : [ " rust" ] ,
7074 } ,
7175 } ) ,
7276} ;
0 commit comments