11import type { Config } from "@docusaurus/types" ;
2+ import { themes as prismThemes } from "prism-react-renderer" ;
23
34// If your content lives in docs/src, set DOCS_PATH='src'; else '.'
45const DOCS_PATH =
@@ -21,11 +22,108 @@ const config: Config = {
2122 sidebarPath : "./sidebars.ts" ,
2223 remarkPlugins : [ require ( "remark-math" ) ] ,
2324 rehypePlugins : [ require ( "rehype-katex" ) ] ,
25+ versions : {
26+ current : {
27+ label : `stable` ,
28+ } ,
29+ } ,
2430 } ,
2531 blog : false ,
2632 pages : false ,
33+ theme : {
34+ customCss : "./styles.css" ,
35+ } ,
36+ } ,
37+ ] ,
38+ ] ,
39+
40+ plugins : [
41+ [
42+ "@cmfcmf/docusaurus-search-local" ,
43+ {
44+ // whether to index docs pages
45+ indexDocs : true ,
46+
47+ // whether to index blog pages
48+ indexBlog : false ,
49+
50+ // whether to index static pages
51+ indexPages : false ,
52+
53+ // language of your documentation, see next section
54+ language : "en" ,
55+
56+ // setting this to "none" will prevent the default CSS to be included. The default CSS
57+ // comes from autocomplete-theme-classic, which you can read more about here:
58+ // https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-theme-classic/
59+ style : undefined ,
60+
61+ // lunr.js-specific settings
62+ lunr : {
63+ // When indexing your documents, their content is split into "tokens".
64+ // Text entered into the search box is also tokenized.
65+ // This setting configures the separator used to determine where to split the text into tokens.
66+ // By default, it splits the text at whitespace and dashes.
67+ //
68+ // Note: Does not work for "ja" and "th" languages, since these use a different tokenizer.
69+ tokenizerSeparator : / [ \s \- ] + / ,
70+ // https://lunrjs.com/guides/customising.html#similarity-tuning
71+ //
72+ // This parameter controls the importance given to the length of a document and its fields. This
73+ // value must be between 0 and 1, and by default it has a value of 0.75. Reducing this value
74+ // reduces the effect of different length documents on a term's importance to that document.
75+ b : 0.75 ,
76+ // This controls how quickly the boost given by a common word reaches saturation. Increasing it
77+ // will slow down the rate of saturation and lower values result in quicker saturation. The
78+ // default value is 1.2. If the collection of documents being indexed have high occurrences
79+ // of words that are not covered by a stop word filter, these words can quickly dominate any
80+ // similarity calculation. In these cases, this value can be reduced to get more balanced results.
81+ k1 : 1.2 ,
82+ // By default, we rank pages where the search term appears in the title higher than pages where
83+ // the search term appears in just the text. This is done by "boosting" title matches with a
84+ // higher value than content matches. The concrete boosting behavior can be controlled by changing
85+ // the following settings.
86+ titleBoost : 5 ,
87+ contentBoost : 1 ,
88+ tagsBoost : 3 ,
89+ parentCategoriesBoost : 2 , // Only used when indexing is enabled for categories
90+ } ,
2791 } ,
2892 ] ,
2993 ] ,
94+
95+ themeConfig :
96+ /** @type {import('@docusaurus/preset-classic').ThemeConfig } */
97+ {
98+ colorMode : {
99+ defaultMode : "light" ,
100+ disableSwitch : true ,
101+ } ,
102+ prism : {
103+ theme : prismThemes . oneLight ,
104+ darkTheme : prismThemes . oneDark ,
105+ additionalLanguages : [ "rust" , "solidity" , "toml" , "yaml" ] ,
106+ } ,
107+ navbar : {
108+ logo : {
109+ src : "img/logo.png" ,
110+ alt : "Miden Logo" ,
111+ height : 240 ,
112+ } ,
113+ title : "MIDEN" ,
114+ items : [
115+ {
116+ type : "docsVersionDropdown" ,
117+ position : "left" ,
118+ dropdownActiveClassDisabled : true ,
119+ } ,
120+ {
121+ href : "https://github.com/0xMiden/" ,
122+ label : "GitHub" ,
123+ position : "right" ,
124+ } ,
125+ ] ,
126+ } ,
127+ } ,
30128} ;
31129export default config ;
0 commit comments