Skip to content

Commit c20a3b0

Browse files
authored
Add Posthog (#98)
1 parent 005efb5 commit c20a3b0

File tree

7 files changed

+65
-3
lines changed

7 files changed

+65
-3
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
POSTHOG_API_KEY=your_posthog_api_key

.github/workflows/docusaurus-build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,6 @@ jobs:
2727
run: npm ci
2828

2929
- name: Build site
30-
run: npm run build
30+
run: npm run build
31+
env:
32+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}

.github/workflows/pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ jobs:
3232
run: npm ci
3333
- name: Build
3434
run: npm run build
35+
env:
36+
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
3537
- name: Setup Pages
3638
uses: actions/configure-pages@v5
3739
- name: Upload artifact

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# Misc
1414
.DS_Store
15+
.env
1516
.env.local
1617
.env.development.local
1718
.env.test.local

docusaurus.config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ const config: Config = {
6868
],
6969

7070
plugins: [
71+
...(process.env.POSTHOG_API_KEY ? [
72+
[
73+
"posthog-docusaurus",
74+
{
75+
apiKey: process.env.POSTHOG_API_KEY,
76+
appUrl: "https://us.i.posthog.com",
77+
enableInDevelopment: true,
78+
},
79+
],
80+
] : []),
7181
[
7282
'@docusaurus/plugin-client-redirects',
7383
{
@@ -203,6 +213,28 @@ const config: Config = {
203213
},
204214
],
205215
},
216+
{
217+
title: 'Company',
218+
items: [
219+
{
220+
label: 'Contact',
221+
href: 'mailto:[email protected]',
222+
target: '_self',
223+
},
224+
{
225+
label: 'Careers',
226+
href: 'https://careers.roocode.com',
227+
},
228+
{
229+
label: 'Website Privacy Policy',
230+
href: 'https://roocode.com/privacy',
231+
},
232+
{
233+
label: 'Extension Privacy Policy',
234+
href: 'https://github.com/RooVetGit/Roo-Code/blob/main/PRIVACY.md',
235+
},
236+
],
237+
},
206238
],
207239
},
208240
prism: {

package-lock.json

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

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"private": true,
55
"scripts": {
66
"docusaurus": "docusaurus",
7-
"start": "docusaurus start",
8-
"build": "docusaurus build",
7+
"start": "node -r dotenv/config node_modules/.bin/docusaurus start",
8+
"build": "node -r dotenv/config node_modules/.bin/docusaurus build",
99
"swizzle": "docusaurus swizzle",
1010
"deploy": "docusaurus deploy",
1111
"clear": "docusaurus clear",
@@ -22,6 +22,7 @@
2222
"@mdx-js/react": "^3.0.0",
2323
"@vscode/codicons": "^0.0.36",
2424
"clsx": "^2.0.0",
25+
"posthog-docusaurus": "^2.0.4",
2526
"prism-react-renderer": "^2.3.0",
2627
"react": "^19.0.0",
2728
"react-dom": "^19.0.0"
@@ -30,6 +31,7 @@
3031
"@docusaurus/module-type-aliases": "3.7.0",
3132
"@docusaurus/tsconfig": "3.7.0",
3233
"@docusaurus/types": "3.7.0",
34+
"dotenv": "^16.4.7",
3335
"typescript": "~5.6.2"
3436
},
3537
"browserslist": {

0 commit comments

Comments
 (0)