Skip to content

Commit 0745e6a

Browse files
chatbot appears as small icon in every page - no new page for chatbot
1 parent 8c4221d commit 0745e6a

File tree

4 files changed

+26
-31
lines changed

4 files changed

+26
-31
lines changed

docs/intro/chatbot.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docusaurus.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@ const config: Config = {
1111
onBrokenMarkdownLinks: 'throw',
1212
onBrokenAnchors: 'throw',
1313
favicon: 'logos/favicon.png',
14+
1415
clientModules: [
1516
require.resolve('./src/js/table-helpers.js'),
17+
require.resolve('./src/js/chatbot.js'),
1618
],
1719
i18n: {
1820
defaultLocale: 'en',

sidebars.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ const sidebars: SidebarsConfig = {
132132
dirName: 'misc'
133133
}
134134
],
135-
},
136-
{
137-
type: 'doc',
138-
id: 'intro/chatbot',
139-
label: 'Documentation Chatbot',
140135
}
141136
]
142137
};

src/js/chatbot.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Simple Dify chatbot loader
2+
(function() {
3+
if (typeof window === 'undefined') return;
4+
5+
// Set configuration
6+
window.difyChatbotConfig = {
7+
token: 'bYIppJMzMieMPDHm'
8+
};
9+
10+
// Load the script
11+
const script = document.createElement('script');
12+
script.src = 'https://udify.app/embed.min.js';
13+
script.defer = true;
14+
document.head.appendChild(script);
15+
16+
// Add custom styles for purple color
17+
const style = document.createElement('style');
18+
style.textContent = `
19+
#dify-chatbot-bubble-button {
20+
background-color: #4B39EF !important;
21+
}
22+
`;
23+
document.head.appendChild(style);
24+
})();

0 commit comments

Comments
 (0)