Skip to content

Commit

Permalink
Docs: Try to add gurubase
Browse files Browse the repository at this point in the history
  • Loading branch information
BornToBeRoot committed Jan 17, 2025
1 parent 80cbdcb commit 7906215
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const config = {
projectName: "NETworkManager",

trailingSlash: false,

onBrokenLinks: "throw",
onBrokenAnchors: "throw",
onBrokenMarkdownLinks: "throw",
Expand Down Expand Up @@ -74,7 +74,7 @@ const config = {
type: "docSidebar",
sidebarId: "docsSidebar",
position: "left",
label: "Docs",
label: "Documentation",
},
{
to: "/blog",
Expand All @@ -87,7 +87,7 @@ const config = {
position: "right",
},
],
},
},
footer: {
style: "dark",
links: [
Expand All @@ -99,7 +99,7 @@ const config = {
to: "/download",
},
{
label: "Docs",
label: "Documentation",
to: "/docs/introduction",
},
{
Expand All @@ -112,8 +112,8 @@ const config = {
title: "Community",
items: [
{
label: "Twitter",
href: "https://twitter.com/_BornToBeRoot",
label: "X",
href: "https://x.com/_BornToBeRoot",
},
],
},
Expand Down Expand Up @@ -142,6 +142,10 @@ const config = {
darkTheme: prismThemes.dracula,
},
}),

plugins: [
require.resolve("./plugins/gurubase-widget.js")
],
};

export default config;
27 changes: 27 additions & 0 deletions Website/plugins/gurubase-widget.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = function (context) {
return {
name: "docusaurus-plugin-gurubase-widget", // Feel free to change this name
injectHtmlTags() {
return {
postBodyTags: [
{
tagName: "script",
attributes: {
src: "https://widget.gurubase.io/widget.latest.min.js",
"data-widget-id": "Zd_w46FaGI0XssTb2Sjivabt0w__rvepD0w1rQ5uKIg",
"data-text": "Ask AI",
"data-margins": '{"bottom": "20px", "right": "20px"}',
"data-light-mode": "false",
"data-name": "NETworkManager",
"data-icon-url": "https://borntoberoot.net/NETworkManager/img/logo.svg",
"data-bg-color": "#00d4aa",
defer: true,
id: "guru-widget-id", // Do not change this
},
},
],
};
},
};
};

0 comments on commit 7906215

Please sign in to comment.