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 8deabf88eb0 Add Matomo & Kapa (#3094)
8deabf88eb0 is described below
commit 8deabf88eb08393226a1273608c7dd8974f10134
Author: Albumen Kevin <[email protected]>
AuthorDate: Tue Jan 28 22:39:23 2025 +0800
Add Matomo & Kapa (#3094)
---
cn_config.toml | 2 +-
config.toml | 2 +-
layouts/partials/head.html | 19 +++++++++++++++++++
layouts/partials/scripts.html | 20 ++++++++++++++++++++
4 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/cn_config.toml b/cn_config.toml
index e4caa2543a1..e54e457fe05 100644
--- a/cn_config.toml
+++ b/cn_config.toml
@@ -171,7 +171,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 e0629f05748..d08ed93752f 100644
--- a/config.toml
+++ b/config.toml
@@ -168,7 +168,7 @@ github_branch = "master"
#gcs_engine_id = "011737558837375720776:fsdu1nryfng"
-algolia_docsearch = true
+algolia_docsearch = false
offlineSearch = false
prism_syntax_highlighting = true
disable_click2copy_chroma = false
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index c7a38ddeeea..541bb2b425f 100755
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -15,10 +15,29 @@
{{ else }}
<link rel="canonical" href="{{ .Permalink }}">
{{ end }}
+<!-- Matomo -->
+<script>
+ var _paq = window._paq = window._paq || [];
+ /* tracker methods like "setCustomDimension" should be called before
"trackPageView" */
+ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
+ _paq.push(["setCookieDomain", "*.dubbo.apache.org"]);
+ _paq.push(['trackPageView']);
+ _paq.push(['enableLinkTracking']);
+ (function() {
+ var u="https://analytics.apache.org/";
+ _paq.push(['setTrackerUrl', u+'matomo.php']);
+ _paq.push(['setSiteId', '24']);
+ var d=document, g=d.createElement('script'),
s=d.getElementsByTagName('script')[0];
+ g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
+ })();
+</script>
+<!-- End Matomo Code -->
<!-- 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 *">
{{ 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 9c2dcf8c6c5..6339d6da34c 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -68,6 +68,26 @@
<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>
+
+
+
+
<!--init performance SDK -->
<script>
(function (w, d, s, q, i) {