Skip to content

Commit 2ad8df6

Browse files
committed
feat(docs): add Fathom Analytics integration
- Add nuxt-fathom module - Configure via NUXT_PUBLIC_FATHOM_SITE_ID env var - Add FATHOM_SITE_ID secret to deployment workflow
1 parent 55b79e5 commit 2ad8df6

File tree

5 files changed

+131
-33
lines changed

5 files changed

+131
-33
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 || '3.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: 'Flowforge',

docs/package-lock.json

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

docs/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
"docus": "latest",
1616
"nuxt": "^4.1.2",
1717
"typescript": "^5.9.2"
18+
},
19+
"devDependencies": {
20+
"nuxt-fathom": "^0.0.3"
1821
}
1922
}

0 commit comments

Comments
 (0)