diff --git a/backlog/tasks/task-85 - Remove-docs-plausible-analytics-integration.md b/backlog/tasks/task-85 - Remove-docs-plausible-analytics-integration.md new file mode 100644 index 0000000..d0b5afe --- /dev/null +++ b/backlog/tasks/task-85 - Remove-docs-plausible-analytics-integration.md @@ -0,0 +1,38 @@ +--- +id: TASK-85 +title: 'Remove docs Plausible analytics integration' +status: Done +assignee: [] +created_date: '2026-03-03 00:00' +updated_date: '2026-03-03 00:00' +labels: [] +dependencies: [] +priority: medium +ordinal: 12001 +--- + +## Description + + + +Remove Plausible analytics integration from docs theme and dependency graph. Keep docs build/runtime analytics-free. + + + +## Acceptance Criteria + + + +- [x] #1 Docs theme no longer imports or initializes Plausible tracker. +- [x] #2 `@plausible-analytics/tracker` removed from dependencies and lockfile. +- [x] #3 Docs analytics test reflects absence of Plausible wiring. + + + +## Final Summary + + + +Deleted Plausible runtime wiring from VitePress theme, removed tracker package via `bun remove`, and updated docs test to assert no Plausible integration remains. + + diff --git a/bun.lock b/bun.lock index 2fe0ce9..c69309c 100644 --- a/bun.lock +++ b/bun.lock @@ -6,7 +6,6 @@ "name": "subminer", "dependencies": { "@catppuccin/vitepress": "^0.1.2", - "@plausible-analytics/tracker": "^0.4.4", "axios": "^1.13.5", "commander": "^14.0.3", "discord-rpc": "^4.0.1", @@ -189,8 +188,6 @@ "@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="], - "@plausible-analytics/tracker": ["@plausible-analytics/tracker@0.4.4", "", {}, "sha512-fz0NOYUEYXtg1TBaPEEvtcBq3FfmLFuTe1VZw4M8sTWX129br5dguu3M15+plOQnc181ShYe67RfwhKgK89VnA=="], - "@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.57.1", "", { "os": "android", "cpu": "arm" }, "sha512-A6ehUVSiSaaliTxai040ZpZ2zTevHYbvu/lDoeAteHI8QnaosIzm4qwtezfRg1jOYaUmnzLX1AOD6Z+UJjtifg=="], "@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.57.1", "", { "os": "android", "cpu": "arm64" }, "sha512-dQaAddCY9YgkFHZcFNS/606Exo8vcLHwArFZ7vxXq4rigo2bb494/xKMMwRRQW6ug7Js6yXmBZhSBRuBvCCQ3w=="], diff --git a/docs/.vitepress/theme/index.ts b/docs/.vitepress/theme/index.ts index 17f627c..3781715 100644 --- a/docs/.vitepress/theme/index.ts +++ b/docs/.vitepress/theme/index.ts @@ -5,26 +5,8 @@ import '@catppuccin/vitepress/theme/macchiato/mauve.css'; import './mermaid-modal.css'; let mermaidLoader: Promise | null = null; -let plausibleTrackerInitialized = false; const MERMAID_MODAL_ID = 'mermaid-diagram-modal'; -async function initPlausibleTracker() { - if (typeof window === 'undefined' || plausibleTrackerInitialized) { - return; - } - - const { init } = await import('@plausible-analytics/tracker'); - init({ - domain: 'subminer.moe', - endpoint: 'https://worker.subminer.moe/api/event', - outboundLinks: true, - fileDownloads: true, - formSubmissions: true, - captureOnLocalhost: false, - }); - plausibleTrackerInitialized = true; -} - function closeMermaidModal() { if (typeof document === 'undefined') { return; @@ -207,9 +189,6 @@ export default { }; onMounted(() => { - initPlausibleTracker().catch((error) => { - console.error('Failed to initialize Plausible tracker:', error); - }); render(); }); watch(() => route.path, render); diff --git a/docs/plausible.test.ts b/docs/plausible.test.ts index bc8724f..3cc77c4 100644 --- a/docs/plausible.test.ts +++ b/docs/plausible.test.ts @@ -4,12 +4,12 @@ import { readFileSync } from 'node:fs'; const docsThemePath = new URL('./.vitepress/theme/index.ts', import.meta.url); const docsThemeContents = readFileSync(docsThemePath, 'utf8'); -test('docs theme configures plausible tracker for subminer.moe via worker.subminer.moe api endpoint', () => { - expect(docsThemeContents).toContain('@plausible-analytics/tracker'); - expect(docsThemeContents).toContain('const { init } = await import'); - expect(docsThemeContents).toContain("domain: 'subminer.moe'"); - expect(docsThemeContents).toContain("endpoint: 'https://worker.subminer.moe/api/event'"); - expect(docsThemeContents).toContain('outboundLinks: true'); - expect(docsThemeContents).toContain('fileDownloads: true'); - expect(docsThemeContents).toContain('formSubmissions: true'); +test('docs theme has no plausible analytics wiring', () => { + expect(docsThemeContents).not.toContain('@plausible-analytics/tracker'); + expect(docsThemeContents).not.toContain('initPlausibleTracker'); + expect(docsThemeContents).not.toContain('worker.subminer.moe'); + expect(docsThemeContents).not.toContain('domain:'); + expect(docsThemeContents).not.toContain('outboundLinks: true'); + expect(docsThemeContents).not.toContain('fileDownloads: true'); + expect(docsThemeContents).not.toContain('formSubmissions: true'); }); diff --git a/package.json b/package.json index 862e69c..bbd0957 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "license": "GPL-3.0-or-later", "dependencies": { "@catppuccin/vitepress": "^0.1.2", - "@plausible-analytics/tracker": "^0.4.4", "axios": "^1.13.5", "commander": "^14.0.3", "discord-rpc": "^4.0.1",