11// @ts -check
22// Note: type annotations allow type checking and IDEs autocompletion
3- const lightCodeTheme = require ( "prism-react-renderer/themes/github" ) ;
4- const darkCodeTheme = require ( "prism-react-renderer/themes/palenight" ) ;
3+ const lightCodeTheme = require ( "prism-react-renderer" ) . themes . github ;
4+ const darkCodeTheme = require ( "prism-react-renderer" ) . themes . palenight ;
55// Override code block theme
66const customDarkTheme = {
77 ...darkCodeTheme ,
@@ -21,7 +21,22 @@ const config = {
2121 projectName : "docs" , // Usually your repo name.
2222 trailingSlash : false ,
2323 // Waiting for docusauras canary to be released for mermaid support: https://docusaurus.io/docs/next/markdown-features/diagrams
24- themes : [ '@docusaurus/theme-mermaid' ] ,
24+ themes : [ "@docusaurus/theme-mermaid" ,
25+ [
26+ "@easyops-cn/docusaurus-search-local" ,
27+ /** @type {import("@easyops-cn/docusaurus-search-local") } */
28+ ( {
29+ hashed : true ,
30+ language : [ 'en' ] ,
31+ indexDocs : true ,
32+ indexBlog : false ,
33+ docsRouteBasePath : '/' ,
34+ blogRouteBasePath : '/blog' ,
35+ highlightSearchTermsOnTargetPage : true ,
36+ explicitSearchResultPath : true ,
37+ } ) ,
38+ ] ,
39+ ] ,
2540 markdown : {
2641 mermaid : true ,
2742 } ,
@@ -152,7 +167,7 @@ const config = {
152167 prism : {
153168 theme : lightCodeTheme ,
154169 darkTheme : customDarkTheme ,
155- additionalLanguages : [ "solidity" , "json5" , "toml" ] ,
170+ additionalLanguages : [ "solidity" , "json5" , "toml" , "bash" ] ,
156171 } ,
157172 // metadata: [ // TODO: Take screenshot for rendering previews
158173 // {property: "og:image", content: "/img/image.png"},
0 commit comments