Skip to content

Commit

Permalink
Merge pull request #18 from ForkbombEu/matomo
Browse files Browse the repository at this point in the history
feat: add matomo support
  • Loading branch information
andrea-dintino authored Jun 9, 2024
2 parents c4b9bc3 + a0517bb commit dc01c2f
Show file tree
Hide file tree
Showing 3 changed files with 1,289 additions and 3 deletions.
12 changes: 9 additions & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import matomo from "@datagouv/vitepress-plugin-matomo";
import './style.css'

export default {
Expand All @@ -11,7 +12,12 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
// ...
enhanceApp: (ctx) => {
matomo({
router: ctx.router,
siteID: 9, // Replace with your site id
trackerUrl: "https://matomo.dyne.org/" // Replace with your matomo url
})
}
} satisfies Theme
} satisfies Theme

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"prebuild": "cd docs/.installation_instructions && make didroom-microservices-installer.sh"
},
"devDependencies": {
"@datagouv/vitepress-plugin-matomo": "^1.0.5",
"vitepress": "^1.0.2",
"vitepress-sidebar": "^1.22.0",
"vue": "^3.4.21"
Expand Down
Loading

0 comments on commit dc01c2f

Please sign in to comment.