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

zhangzhe pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fesod.git


The following commit(s) were added to refs/heads/main by this push:
     new dd8fc53c Revert "feat: remove docusaurus-plugin-matomo and add custom 
Matomo tracking …" (#633)
dd8fc53c is described below

commit dd8fc53ce09a8fe9ea4a70b72e98b5cdfc479fc0
Author: DeleiGuo <[email protected]>
AuthorDate: Thu Oct 9 21:24:35 2025 +0800

    Revert "feat: remove docusaurus-plugin-matomo and add custom Matomo 
tracking …" (#633)
    
    This reverts commit 90f507a222e880c971cbafec833aa201402eb6f7.
---
 website/docusaurus.config.js | 32 +++++++++-----------------------
 website/package.json         |  1 +
 2 files changed, 10 insertions(+), 23 deletions(-)

diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index e49ac778..83c22bd1 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -86,7 +86,8 @@ const config = {
                 editUrl: `${repoUrl}/edit/${branch}/website/`,
                 editLocalizedFiles: true,
             },
-        ]
+        ],
+        'docusaurus-plugin-matomo'
     ],
     themeConfig: ({
         image: 'img/logo.svg',
@@ -197,31 +198,16 @@ const config = {
             theme: prismThemes.github,
             darkTheme: prismThemes.oneDark,
             additionalLanguages: ['java', 'bash']
+        },
+        matomo: {
+            matomoUrl: 'https://analytics.apache.org/',
+            siteId: '83',
+            phpLoader: 'matomo.php',
+            jsLoader: 'matomo.js',
         }
     }),
     themes: ['@docusaurus/theme-mermaid'],
-    headTags: [
-        {
-            tagName: 'script',
-            attributes: {
-                type: 'text/javascript',
-            },
-            innerHTML: `
-              var _paq = window._paq = window._paq || [];
-               /* tracker methods like "setCustomDimension" should be called 
before "trackPageView" */
-              _paq.push(["disableCookies"]);
-              _paq.push(['trackPageView']);
-              _paq.push(['enableLinkTracking']);
-              (function() {
-                var u="https://analytics.apache.org/";;
-                _paq.push(['setTrackerUrl', u+'matomo.php']);
-                _paq.push(['setSiteId', '83']);
-                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);
-              })();
-            `,
-        },
-    ],
+    headTags: [],
     markdown: {
         format: 'md',
         mermaid: true,
diff --git a/website/package.json b/website/package.json
index f35f29ba..feddbd1e 100644
--- a/website/package.json
+++ b/website/package.json
@@ -23,6 +23,7 @@
     "@docusaurus/theme-mermaid": "^3.9.1",
     "@mdx-js/react": "^3.0.0",
     "clsx": "^2.0.0",
+    "docusaurus-plugin-matomo": "^0.0.8",
     "markdownlint-cli2": "^0.18.1",
     "prism-react-renderer": "^2.3.0",
     "react": "^19.0.0",


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to