Skip to content

Commit

Permalink
Add Matomo & Kapa (#3094)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbumenJ authored Jan 28, 2025
1 parent 0ff558c commit 8deabf8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cn_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ github_branch = "master"

#gcs_engine_id = "011737558837375720776:fsdu1nryfng"

algolia_docsearch = true
algolia_docsearch = false
offlineSearch = false


Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 19 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}">
Expand Down
20 changes: 20 additions & 0 deletions layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 8deabf8

Please sign in to comment.