Skip to content

Commit

Permalink
Adding analytics to docs site (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
iainnash authored Sep 5, 2024
1 parent 27f1d5e commit 3269d09
Show file tree
Hide file tree
Showing 3 changed files with 310 additions and 287 deletions.
13 changes: 7 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@
"preview": "vocs preview"
},
"dependencies": {
"@0xsplits/splits-sdk": "^4.0.2",
"@mdx-js/mdx": "^3.0.0",
"@tanstack/react-query": "^5.37.1",
"@types/node": "^20.13.0",
"@types/react": "latest",
"@vanilla-extract/css": "^1.15.3",
"@zoralabs/protocol-deployments": "workspace:*",
"@zoralabs/protocol-sdk": "workspace:*",
"@zoralabs/tsconfig": "workspace:*",
"react": "latest",
"react-dom": "latest",
"typescript": "^5.2.2",
"viem": "^2.13.2",
"vite-plugin-radar": "^0.9.6",
"vite-tsconfig-paths": "^4.3.2",
"vocs": "^1.0.0-alpha.55",
"wagmi": "^2.9.4",
"yaml": "2.3.4",
"@0xsplits/splits-sdk": "^4.0.2",
"@types/node": "^20.13.0",
"@zoralabs/protocol-deployments": "workspace:*",
"@zoralabs/protocol-sdk": "workspace:*",
"@zoralabs/tsconfig": "workspace:*"
"yaml": "2.3.4"
}
}
12 changes: 11 additions & 1 deletion docs/vocs.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import VitePluginRadar from "vite-plugin-radar";
import { defineConfig } from "vocs";

export default defineConfig({
title: "ZORA Docs",
titleTemplate: "%s | ZORA Docs",
iconUrl: "/Zorb.png",
logoUrl: "/Zorb.png",
ogImageUrl:"https://docs.zora.co/og.png",
ogImageUrl: "https://docs.zora.co/og.png",
basePath: process.env.BASE_PATH,
rootDir: ".",
topNav: [
Expand Down Expand Up @@ -215,6 +216,15 @@ export default defineConfig({
],
},
vite: {
plugins: process.env.GOOGLE_ANALYTICS_TAG_ID
? [
VitePluginRadar({
analytics: {
id: process.env.GOOGLE_ANALYTICS_TAG_ID as string,
},
}),
]
: [],
esbuild: {
supported: {
"top-level-await": true, //browsers can handle top-level-await features
Expand Down
Loading

0 comments on commit 3269d09

Please sign in to comment.