From 72657a60a01bf95354b5a089dca488bf9b97ac7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 23 Jun 2023 13:55:59 +0200 Subject: [PATCH] feat: expose kapi as part of docs (#3996) Small poc to add ask kapi.ai to our docs. UI not great yet. ![image](https://github.com/Unleash/unleash/assets/158948/68a5b60f-0262-4fe3-89d8-3fcf30d23029) And this is the widget in action: ![image](https://github.com/Unleash/unleash/assets/158948/63b0bcdd-b164-46dc-89ea-7f7f80aa364a) --------- Co-authored-by: Thomas Heartman --- website/docusaurus.config.js | 11 +++++++++++ website/src/components/Figure/styles.module.css | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 72717cbb9d..c6b969749f 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -636,4 +636,15 @@ module.exports = { 'docusaurus-theme-openapi-docs', // Allows use of @theme/ApiItem and other components '@docusaurus/theme-mermaid', ], + scripts: [ + { + src: 'https://widget.kapa.ai/kapa-widget.bundle.js', + 'data-website-id': '1d187510-1726-4011-b0f7-62742ae064ee', + 'data-project-name': 'Unleash', + 'data-project-color': '#1A4049', + 'data-project-logo': + 'https://cdn.getunleash.io/uploads/2022/05/logo.png', + async: true, + }, + ], }; diff --git a/website/src/components/Figure/styles.module.css b/website/src/components/Figure/styles.module.css index 8079842656..514dafce5f 100644 --- a/website/src/components/Figure/styles.module.css +++ b/website/src/components/Figure/styles.module.css @@ -1,5 +1,5 @@ /* Figures (with captions) */ -figure { +.main-wrapper figure { box-shadow: var(--ifm-global-shadow-lw); border-radius: var(--ifm-global-radius); border: var(--ifm-global-border-width) solid var(--unleash-color-gray);