Skip to content

Commit

Permalink
use outside script
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianthedev committed Sep 10, 2024
1 parent b3e925f commit 3406dbf
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,51 +23,52 @@ const config = {
defer: true,
},
],
[
'script',
{},
`// Embed the widget using the Inkeep.embed() function.
const config = {
componentType: "ChatButton",
// optional -- for syncing UI color mode
colorModeSync: {
observedElement: document.documentElement,
isDarkModeCallback: (el) => {
return el.classList.contains("dark");
},
colorModeAttribute: "class",
},
properties: {
chatButtonType: "PILL",
baseSettings: {
apiKey: import.meta.env.VITE_INKEEP_API_KEY, // required
integrationId: import.meta.env.VITE_INKEEP_INTEGRATION_ID, // required
organizationId: import.meta.env.VITE_INKEEP_ORGANIZATION_ID, // required
primaryBrandColor: "#1398FE", // your brand color, widget color scheme is derived from this
organizationDisplayName: "Avo",
// ...optional settings
chatButtonText: "Ask the AI Assistant",
},
modalSettings: {
// optional settings
},
searchSettings: {
// optional settings
},
aiChatSettings: {
// optional settings
botAvatarSrcUrl: "/logomark.png", // use your own bot avatar
// quickQuestions: [
// "Example question 1?",
// "Example question 2?",
// "Example question 3?",
// ],
},
},
};
["script", { src: "static/addInkeep.js", type: "module", defer: true }],
// [;
// 'script',
// {},
// `// Embed the widget using the Inkeep.embed() function.
// const config = {
// componentType: "ChatButton",
// // optional -- for syncing UI color mode
// colorModeSync: {
// observedElement: document.documentElement,
// isDarkModeCallback: (el) => {
// return el.classList.contains("dark");
// },
// colorModeAttribute: "class",
// },
// properties: {
// chatButtonType: "PILL",
// baseSettings: {
// apiKey: import.meta.env.VITE_INKEEP_API_KEY, // required
// integrationId: import.meta.env.VITE_INKEEP_INTEGRATION_ID, // required
// organizationId: import.meta.env.VITE_INKEEP_ORGANIZATION_ID, // required
// primaryBrandColor: "#1398FE", // your brand color, widget color scheme is derived from this
// organizationDisplayName: "Avo",
// // ...optional settings
// chatButtonText: "Ask the AI Assistant",
// },
// modalSettings: {
// // optional settings
// },
// searchSettings: {
// // optional settings
// },
// aiChatSettings: {
// // optional settings
// botAvatarSrcUrl: "/logomark.png", // use your own bot avatar
// // quickQuestions: [
// // "Example question 1?",
// // "Example question 2?",
// // "Example question 3?",
// // ],
// },
// },
// };

const inkeepWidget = Inkeep().embed(config);`
],
// const inkeepWidget = Inkeep().embed(config);`
// ],
// <script async="" src="https://www.google-analytics.com/analytics.js"></script>
[
'script',
Expand Down

0 comments on commit 3406dbf

Please sign in to comment.