Skip to content

Commit 39afd01

Browse files
committed
feat(docs): add Fathom Analytics integration
Add nuxt-fathom module for privacy-friendly analytics tracking. Site ID is configured via FATHOM_SITE_ID secret in GitHub Actions.
1 parent 5158b26 commit 39afd01

File tree

5 files changed

+63
-4
lines changed

5 files changed

+63
-4
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
NUXT_APP_BASE_URL: ${{ steps.config.outputs.base_url }}
9494
NUXT_SITE_URL: https://relaticle.github.io
9595
DOCS_VERSION: ${{ steps.version.outputs.branch }}
96+
NUXT_PUBLIC_FATHOM_SITE_ID: ${{ secrets.FATHOM_SITE_ID }}
9697

9798
- name: Deploy to gh-pages
9899
run: |

docs/.env.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Fathom Analytics
2+
NUXT_PUBLIC_FATHOM_SITE_ID=your-fathom-site-id

docs/nuxt.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ const docsVersion = process.env.DOCS_VERSION || '2.x'
44

55
export default defineNuxtConfig({
66
extends: 'docus',
7-
modules: ['@nuxt/image', '@nuxt/scripts'],
7+
modules: ['@nuxt/image', '@nuxt/scripts', 'nuxt-fathom'],
8+
fathom: {
9+
siteId: process.env.NUXT_PUBLIC_FATHOM_SITE_ID || '',
10+
},
811
devtools: { enabled: true },
912
site: {
1013
name: 'Custom Fields',

docs/package-lock.json

Lines changed: 55 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"typescript": "^5.9.2"
1818
},
1919
"devDependencies": {
20+
"nuxt-fathom": "^0.0.3",
2021
"zod": "^4.3.5",
2122
"zod-to-json-schema": "^3.25.1"
2223
}

0 commit comments

Comments
 (0)