@@ -8,81 +8,68 @@ const config: Config = {
88 favicon : 'img/favicon.ico' ,
99
1010 url : 'https://cpp.objectbox.io' ,
11- /*baseUrl: '/',*/
1211 baseUrl : '/' ,
1312
14- organizationName : 'objectbox' ,
13+ organizationName : 'objectbox' ,
1514 projectName : 'objectbox-c-cpp-docs' ,
1615
1716 onBrokenLinks : 'throw' ,
1817 onBrokenMarkdownLinks : 'warn' ,
1918
20- i18n : {
21- defaultLocale : 'en' ,
22- locales : [ 'en' ] ,
23- } ,
19+ i18n : { defaultLocale : 'en' , locales : [ 'en' ] } ,
2420
2521 themes : [
2622 [
27- '@easyops-cn/docusaurus-search-local' ,
28- {
29- hashed : true ,
30- language : [ 'en' ] ,
31- highlightSearchTermsOnTargetPage : true ,
32- explicitSearchResultPath : false , // Changed from true - this can cause 404s
33- indexDocs : true ,
34- indexBlog : false ,
35- indexPages : true ,
36- docsRouteBasePath : '/' ,
37- searchResultLimits : 8 ,
38- searchResultContextMaxLength : 50 ,
39- ignoreFiles : [ ] ,
40- } ,
23+ '@easyops-cn/docusaurus-search-local' ,
24+ {
25+ hashed : true ,
26+ language : [ 'en' ] ,
27+ highlightSearchTermsOnTargetPage : true ,
28+ explicitSearchResultPath : false ,
29+ indexDocs : true ,
30+ indexBlog : false ,
31+ indexPages : true ,
32+ docsRouteBasePath : '/' ,
33+ searchResultLimits : 8 ,
34+ searchResultContextMaxLength : 50 ,
35+ ignoreFiles : [ ] ,
36+ } ,
4137 ] ,
4238 ] ,
4339
44-
45- presets : [
46- [
47- 'classic' ,
48- {
49- docs : {
50- routeBasePath : '/' , // serve docs at /
51- sidebarPath : require . resolve ( './sidebars.ts' ) ,
52- editUrl :
53- 'https://github.com/objectbox/objectbox-c-cpp-docs/blob/main/' ,
54- } ,
55- // If you don't need a blog, you can disable it:
56- blog : false ,
57- theme : {
58- customCss : [
59- require . resolve ( './src/css/custom.css' ) ,
60- ] ,
61- } ,
62- sitemap : {
63- lastmod : 'date' ,
64- changefreq : 'weekly' ,
65- priority : 0.5 ,
66- filename : 'sitemap.xml' ,
67- } ,
68- gtag : {
69- trackingID : 'G-2LXKBNQ3TW' ,
70- anonymizeIP : true ,
71- } ,
72- } satisfies Preset . Options ,
40+ presets : [
41+ [
42+ 'classic' ,
43+ {
44+ docs : {
45+ routeBasePath : '/' ,
46+ sidebarPath : require . resolve ( './sidebars.ts' ) ,
47+ editUrl : 'https://github.com/objectbox/objectbox-c-cpp-docs/blob/main/' ,
48+ } ,
49+ blog : false ,
50+ theme : { customCss : [ require . resolve ( './src/css/custom.css' ) ] } ,
51+ sitemap : {
52+ lastmod : 'date' ,
53+ changefreq : 'weekly' ,
54+ priority : 0.5 ,
55+ filename : 'sitemap.xml' ,
56+ } ,
57+ gtag : {
58+ trackingID : 'G-2LXKBNQ3TW' ,
59+ anonymizeIP : true ,
60+ } ,
61+ } satisfies Preset . Options ,
62+ ] ,
7363 ] ,
74- ] ,
75-
76-
7764
7865 themeConfig : {
7966 image : 'img/objectbox-social-card.jpg' ,
8067 navbar : {
8168 title : 'C / C++ Docs' ,
8269 logo : {
8370 alt : 'ObjectBox Logo' ,
84- src : 'img/objectbox-logo.jpg' , // Logo for light mode
85- srcDark : 'img/objectbox-logo-dm.png' , // Logo for dark mode
71+ src : 'img/objectbox-logo.jpg' ,
72+ srcDark : 'img/objectbox-logo-dm.png' ,
8673 } ,
8774 items : [
8875 // Right side items in the order you want them to appear:
@@ -94,7 +81,7 @@ const config: Config = {
9481 } ,
9582 {
9683 href : 'https://sync.objectbox.io' ,
97- label : 'Data Sync Docs' ,
84+ label : 'Data Sync Docs' ,
9885 position : 'right' ,
9986 // target: '_self', // ← This prevents external link behavior
10087 } ,
@@ -123,15 +110,14 @@ const config: Config = {
123110 prism : {
124111 theme : prismThemes . github ,
125112 darkTheme : prismThemes . dracula ,
126- additionalLanguages : [
127- 'cmake' , 'bash' , 'c' , 'cpp' ,
128- 'swift' , 'kotlin' , 'java' , 'python' ,
129- 'dart' , 'go' , 'protobuf'
130- ] ,
113+ additionalLanguages : [ 'cmake' , 'bash' , 'c' , 'cpp' , 'swift' , 'kotlin' , 'java' , 'python' , 'dart' , 'go' , 'protobuf' ] ,
131114 } ,
132-
133-
134115 } satisfies Preset . ThemeConfig ,
116+
117+ // Put scripts here, inside the same config object
118+ scripts : [ { src : '/js/search-analytics.js' , async : true } ] ,
119+ // Optional: keep this if you want it rendered in the footer
120+ // customFields: {},
135121} ;
136122
137123export default config ;
0 commit comments