chore(docs): remove Plausible tracker integration

This commit is contained in:
2026-03-04 22:50:26 -08:00
parent beeeee5ebd
commit 5436e0cd49
5 changed files with 46 additions and 33 deletions

View File

@@ -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
<!-- SECTION:DESCRIPTION:BEGIN -->
Remove Plausible analytics integration from docs theme and dependency graph. Keep docs build/runtime analytics-free.
<!-- SECTION:DESCRIPTION:END -->
## Acceptance Criteria
<!-- AC:BEGIN -->
- [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.
<!-- AC:END -->
## Final Summary
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Deleted Plausible runtime wiring from VitePress theme, removed tracker package via `bun remove`, and updated docs test to assert no Plausible integration remains.
<!-- SECTION:FINAL_SUMMARY:END -->

View File

@@ -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=="],

View File

@@ -5,26 +5,8 @@ import '@catppuccin/vitepress/theme/macchiato/mauve.css';
import './mermaid-modal.css';
let mermaidLoader: Promise<any> | 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);

View File

@@ -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');
});

View File

@@ -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",