From b02f494f5084734078a32059384507fbdba48d5a Mon Sep 17 00:00:00 2001 From: Kagol Date: Tue, 10 Feb 2026 09:31:14 +0800 Subject: [PATCH 1/2] feat: add furion --- .vitepress/theme/index.ts | 3 +++ .vitepress/theme/insert-furion.ts | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 .vitepress/theme/insert-furion.ts diff --git a/.vitepress/theme/index.ts b/.vitepress/theme/index.ts index b40ed86..a4ca4d9 100644 --- a/.vitepress/theme/index.ts +++ b/.vitepress/theme/index.ts @@ -9,6 +9,7 @@ import '@opentiny/tiny-robot-style' import {nextTick, watch} from 'vue'; import {useRoute} from 'vitepress'; import mediumZoom from 'medium-zoom'; +import { insertFurion } from './insert-furion' // 引入样式文件 import './medium-zoom.css'; import './style.css' @@ -25,6 +26,8 @@ export default { enhanceApp({ app }) { // 监听暗黑模式变化 setupDarkModeListener() + // 添加 furion 监控埋点 + insertFurion() app.mixin({ mounted() { diff --git a/.vitepress/theme/insert-furion.ts b/.vitepress/theme/insert-furion.ts new file mode 100644 index 0000000..eb646d3 --- /dev/null +++ b/.vitepress/theme/insert-furion.ts @@ -0,0 +1,17 @@ +// @ts-ignore 添加 furion 监控埋点 +export function insertFurion() { + !(function (x: string, n: string) { + window[n] = window[n] || {} + window[n].config = { + appId: 'C49090620DD44DFD8E3CA5911408CBBE', + setting: 'api,jsTrack,uba,longtask,rtti,fps', + hashMode: true, + smartJsErr: false + } + let o = document.createElement('script') + o.src = x + o.async = !0 + let d = document.body.firstChild + document.body.insertBefore(o, d) + })('https://res.hc-cdn.com/FurionSdkStatic/3.6.56/furion-cdn.min.js', '__fr') +} From 43b6dbb2034127cd0810ba745e1ae0d9d7a487d2 Mon Sep 17 00:00:00 2001 From: Kagol Date: Tue, 10 Feb 2026 15:48:00 +0800 Subject: [PATCH 2/2] fix: fix build failed --- .vitepress/theme/insert-furion.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/.vitepress/theme/insert-furion.ts b/.vitepress/theme/insert-furion.ts index eb646d3..1aa7ae2 100644 --- a/.vitepress/theme/insert-furion.ts +++ b/.vitepress/theme/insert-furion.ts @@ -1,5 +1,6 @@ // @ts-ignore 添加 furion 监控埋点 export function insertFurion() { + if (typeof document === 'undefined') return !(function (x: string, n: string) { window[n] = window[n] || {} window[n].config = {