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

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


The following commit(s) were added to refs/heads/master by this push:
     new c51e17c2a17 Add kapa AI (#2925)
c51e17c2a17 is described below

commit c51e17c2a17493ab2a073f01182b27ded8069124
Author: Albumen Kevin <[email protected]>
AuthorDate: Mon Feb 26 18:28:09 2024 +0800

    Add kapa AI (#2925)
---
 .htaccess                     |  1 +
 .htmltest.yml                 |  3 +++
 cn_config.toml                |  2 +-
 config.toml                   |  2 +-
 layouts/partials/head.html    |  2 ++
 layouts/partials/scripts.html | 19 +++++++++++++++++++
 6 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/.htaccess b/.htaccess
index a98514a5feb..08679ee8fcc 100644
--- a/.htaccess
+++ b/.htaccess
@@ -7,6 +7,7 @@
     Header always set Cache-Control "no-store, no-cache, must-revalidate"
     Header always set Expires "Thu, 01 Dec 1994 16:00:00 GMT"
     Header always merge Vary "Accept-Language"
+    Header set Content-Security-Policy "frame-src 'self' 
https://www.google.com https://app.netlify.com";
 </IfModule>
 
 <IfModule mod_rewrite.c>
diff --git a/.htmltest.yml b/.htmltest.yml
index 585eb8950bd..297b3524f07 100644
--- a/.htmltest.yml
+++ b/.htmltest.yml
@@ -24,6 +24,9 @@ IgnoreURLs: [
   "https://www.baeldung.com/bdd-mockito";,
   "https://docs.github.com/.*";,
   "http://hessian.caucho.com/.*";,
+  "https://stackoverflow.com/.*";,
+  "http://stackoverflow.com/.*";,
+  "https://unix.stackexchange.com/.*";,
   "https://doi.org/10.1145/3593856.3595909";,
   
"https://github.com/dubbo/awesome-dubbo/blob/master/slides/meetup/201812%40hangzhou/troubleshooting-dubbo-with-arthas.pdf";,
   "https://apachecon.dukecon.org/acna/2018/#/scheduledEvent/b8db9dc580d85853f";,
diff --git a/cn_config.toml b/cn_config.toml
index 2692a49c8f5..47c4142bf7b 100644
--- a/cn_config.toml
+++ b/cn_config.toml
@@ -99,7 +99,7 @@ github_branch = "master"
 
 #gcs_engine_id = "011737558837375720776:fsdu1nryfng"
 
-algolia_docsearch = true
+algolia_docsearch = false
 offlineSearch = false
 
 
diff --git a/config.toml b/config.toml
index 52c3c7a9ee1..74a255f84e6 100644
--- a/config.toml
+++ b/config.toml
@@ -93,7 +93,7 @@ github_branch = "master"
 
 #gcs_engine_id = "011737558837375720776:fsdu1nryfng"
 
-algolia_docsearch = true
+algolia_docsearch = false
 offlineSearch = false
 
 
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 650af5c1b66..dee13288d0b 100755
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -30,6 +30,8 @@
 <!-- Docsy head.html begins here -->
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1, 
shrink-to-fit=no">
+<!--Google needs to be allowed for kapa.ai widget to work-->
+<meta http-equiv="Content-Security-Policy" content="frame-src 'self' 
https://www.google.com/ https://app.netlify.com/;";>
 {{ hugo.Generator }}
 {{ range .AlternativeOutputFormats -}}
 <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | 
safeURL }}">
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index f4c985b32c3..bc86326a774 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -20,4 +20,23 @@
 <!-- scripts for prism -->
 <script src='/js/prism.js'></script>
 {{ end }}
+
+<script async
+        src="https://widget.kapa.ai/kapa-widget.bundle.js";
+        data-website-id="d763c4f2-f871-400b-aeca-d986c4af73c2"
+        data-project-name="Apache Dubbo"
+        data-project-color="#E8442E"
+        data-button-text="Ask AI"
+        data-search-mode-enabled="true"
+        data-modal-open-on-command-k="true"
+        data-modal-disclaimer="The AI supports multiple languages, but it may 
not be accessible in China due to recaptcha, a proxy is required."
+        
data-project-logo="https://pbs.twimg.com/profile_images/1011849068283191302/FJbH5vbF_400x400.jpg";
+        data-modal-example-questions="What is Apache Dubbo?,How to run Apache 
Dubbo?"
+        data-button-position-top=""
+        data-button-position-right="20px"
+        data-button-position-bottom="200px"
+        data-button-position-left=""
+></script>
+
+
 {{ partial "hooks/body-end.html" . }}

Reply via email to