Skip to content

Commit 7906215

Browse files
committed
Docs: Try to add gurubase
1 parent 80cbdcb commit 7906215

File tree

2 files changed

+37
-6
lines changed

2 files changed

+37
-6
lines changed

Website/docusaurus.config.js

+10-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const config = {
2121
projectName: "NETworkManager",
2222

2323
trailingSlash: false,
24-
24+
2525
onBrokenLinks: "throw",
2626
onBrokenAnchors: "throw",
2727
onBrokenMarkdownLinks: "throw",
@@ -74,7 +74,7 @@ const config = {
7474
type: "docSidebar",
7575
sidebarId: "docsSidebar",
7676
position: "left",
77-
label: "Docs",
77+
label: "Documentation",
7878
},
7979
{
8080
to: "/blog",
@@ -87,7 +87,7 @@ const config = {
8787
position: "right",
8888
},
8989
],
90-
},
90+
},
9191
footer: {
9292
style: "dark",
9393
links: [
@@ -99,7 +99,7 @@ const config = {
9999
to: "/download",
100100
},
101101
{
102-
label: "Docs",
102+
label: "Documentation",
103103
to: "/docs/introduction",
104104
},
105105
{
@@ -112,8 +112,8 @@ const config = {
112112
title: "Community",
113113
items: [
114114
{
115-
label: "Twitter",
116-
href: "https://twitter.com/_BornToBeRoot",
115+
label: "X",
116+
href: "https://x.com/_BornToBeRoot",
117117
},
118118
],
119119
},
@@ -142,6 +142,10 @@ const config = {
142142
darkTheme: prismThemes.dracula,
143143
},
144144
}),
145+
146+
plugins: [
147+
require.resolve("./plugins/gurubase-widget.js")
148+
],
145149
};
146150

147151
export default config;

Website/plugins/gurubase-widget.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
module.exports = function (context) {
2+
return {
3+
name: "docusaurus-plugin-gurubase-widget", // Feel free to change this name
4+
injectHtmlTags() {
5+
return {
6+
postBodyTags: [
7+
{
8+
tagName: "script",
9+
attributes: {
10+
src: "https://widget.gurubase.io/widget.latest.min.js",
11+
"data-widget-id": "Zd_w46FaGI0XssTb2Sjivabt0w__rvepD0w1rQ5uKIg",
12+
"data-text": "Ask AI",
13+
"data-margins": '{"bottom": "20px", "right": "20px"}',
14+
"data-light-mode": "false",
15+
"data-name": "NETworkManager",
16+
"data-icon-url": "https://borntoberoot.net/NETworkManager/img/logo.svg",
17+
"data-bg-color": "#00d4aa",
18+
defer: true,
19+
id: "guru-widget-id", // Do not change this
20+
},
21+
},
22+
],
23+
};
24+
},
25+
};
26+
};
27+

0 commit comments

Comments
 (0)