From 5ba4d268cc55c1a355406f96ac9fcf564c5809a7 Mon Sep 17 00:00:00 2001 From: Tan Nguyen Date: Thu, 31 Oct 2024 22:49:06 +0700 Subject: [PATCH] feat: add manual cloudflare analytic v2 --- docusaurus.config.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 858e71d..f8680c8 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -79,13 +79,6 @@ const config: Config = { prism: PrismConfig, algolia: AlgoliaConfig, - scripts: [ - { - src: 'https://static.cloudflareinsights.com/beacon.min.js', - async: true, - 'data-cf-beacon': `{"token": "${process.env.CLOUDFLARE_ANALYTICS_TOKEN}"}`, - }, - ], } satisfies Preset.ThemeConfig, plugins: [ @@ -108,6 +101,14 @@ const config: Config = { ], baseUrlIssueBanner: false, + scripts: [ + { + src: 'https://static.cloudflareinsights.com/beacon.min.js', + async: true, + 'data-cf-beacon': `{"token": "${process.env.CLOUDFLARE_ANALYTICS_TOKEN}"}`, + }, + ], + themes: ['@docusaurus/theme-mermaid', '@docusaurus/theme-live-codeblock'], };