This is an automated email from the ASF dual-hosted git repository.

chufenggao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 46ad7183f8 feat: integrate kapa into website (#957)
46ad7183f8 is described below

commit 46ad7183f809b686255e14397bf7af2c04c8077a
Author: Gallardot <[email protected]>
AuthorDate: Sat May 11 18:22:57 2024 +0800

    feat: integrate kapa into website (#957)
    
    Signed-off-by: Gallardot <[email protected]>
---
 public/images/logo_400x400.jpg  | Bin 0 -> 8244 bytes
 src/components/footer/index.jsx |  19 +++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/public/images/logo_400x400.jpg b/public/images/logo_400x400.jpg
new file mode 100644
index 0000000000..d0e8e8450f
Binary files /dev/null and b/public/images/logo_400x400.jpg differ
diff --git a/src/components/footer/index.jsx b/src/components/footer/index.jsx
index 5cc0c28fd4..c46590bb5e 100644
--- a/src/components/footer/index.jsx
+++ b/src/components/footer/index.jsx
@@ -1,3 +1,4 @@
+import React, { useEffect } from 'react';
 import { Link } from "react-router-dom";
 import { Divider, Button, Space } from "antd";
 import {
@@ -11,6 +12,24 @@ import "./index.scss";
 
 const Footer = () => {
   const { locale, t } = useTranslation();
+  useEffect(() => {
+    const script = document.createElement('script');
+
+    script.src = "https://widget.kapa.ai/kapa-widget.bundle.js";;
+    script.async = true;
+    script.dataset.websiteId = "e3268e5d-c0f1-4e71-819c-c60ebb2215a7";
+    script.dataset.projectName = "Apache DolphinScheduler";
+    script.dataset.projectColor = "#0097E0";
+    script.dataset.projectLogo = "images/logo_400x400.jpg";
+    script.dataset.modalDisclaimer = "This is a custom LLM for Apache 
DolphinScheduler with access to all developer Documentation, Blog, GitHub 
issues and discussions.";
+    script.dataset.modalExampleQuestions = "Why we need DolphinScheduler?,How 
to deploy DolphinScheduler?,How to submit task?,How to contribute?";
+
+    document.body.appendChild(script);
+
+    return () => {
+      document.body.removeChild(script);
+    }
+  }, []);
   return (
     <footer className="footer">
       <section className="footer-content">

Reply via email to