Skip to content

Commit aab29e6

Browse files
committed
Update proxy guide documentation to enhance tab organization and clarity
- Refactor tab structure across multiple proxy guide files to improve user navigation. - Consolidate tab titles for Caddy, Cloudflare Workers, Express, Get Started, Next.js, and Nginx sections, ensuring consistency and clarity in the documentation. - Each section now features updated tab items reflecting the recommended configurations and setups.
1 parent 87621f7 commit aab29e6

6 files changed

Lines changed: 33 additions & 33 deletions

File tree

docs/content/docs/proxy-guide/caddy.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Caddy automatically obtains and renews SSL certificates from Let's Encrypt. No m
4040

4141
Add or update your Caddyfile with the analytics proxy configuration:
4242

43-
<Tabs>
44-
<Tab value="full-proxy-recommended" title="Full Proxy (Recommended)">
43+
<Tabs items={['Full Proxy (Recommended)', 'Minimal Proxy', 'Simplified with Handle Path']}>
44+
<Tab>
4545

4646
```txt
4747
# /etc/caddy/Caddyfile
@@ -132,7 +132,7 @@ Replace `app.rybbit.io` with your self-hosted Rybbit instance URL if you're not
132132
</Callout>
133133

134134
</Tab>
135-
<Tab value="minimal-proxy" title="Minimal Proxy">
135+
<Tab>
136136

137137
```txt
138138
# /etc/caddy/Caddyfile
@@ -161,7 +161,7 @@ yourdomain.com {
161161
```
162162

163163
</Tab>
164-
<Tab value="simplified-with-handle-path" title="Simplified with Handle Path">
164+
<Tab>
165165

166166
Caddy 2.4+ supports a cleaner syntax with `handle_path`:
167167

docs/content/docs/proxy-guide/cloudflare-workers.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Log in to Cloudflare Dashboard and create a new Worker:
4444

4545
Replace the default code with the proxy implementation:
4646

47-
<Tabs>
48-
<Tab value="full-proxy-recommended" title="Full Proxy (Recommended)">
47+
<Tabs items={['Full Proxy (Recommended)', 'Minimal Proxy', 'With Environment Variables']}>
48+
<Tab>
4949

5050
```javascript
5151
// Cloudflare Worker for Rybbit Analytics Proxy
@@ -143,7 +143,7 @@ async function proxyToRybbit(request, url) {
143143
```
144144

145145
</Tab>
146-
<Tab value="minimal-proxy" title="Minimal Proxy">
146+
<Tab>
147147

148148
```javascript
149149
// Minimal Cloudflare Worker for Rybbit
@@ -181,7 +181,7 @@ async function handleRequest(request) {
181181
```
182182

183183
</Tab>
184-
<Tab value="with-environment-variables" title="With Environment Variables">
184+
<Tab>
185185

186186
Using Workers secrets for configuration:
187187

docs/content/docs/proxy-guide/express.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ Install `dotenv` if not already: `npm install dotenv`
6262

6363
### Add Proxy Middleware to Express
6464

65-
<Tabs>
66-
<Tab value="full-proxy-recommended" title="Full Proxy (Recommended)">
65+
<Tabs items={['Full Proxy (Recommended)', 'Minimal Proxy', 'TypeScript']}>
66+
<Tab>
6767

6868
Add to your Express server file (e.g., `server.js` or `app.js`):
6969

@@ -119,7 +119,7 @@ app.listen(PORT, () => {
119119
```
120120

121121
</Tab>
122-
<Tab value="minimal-proxy" title="Minimal Proxy">
122+
<Tab>
123123

124124
Minimal setup with basic tracking:
125125

@@ -153,7 +153,7 @@ app.listen(PORT, () => {
153153
```
154154

155155
</Tab>
156-
<Tab value="typescript" title="TypeScript">
156+
<Tab>
157157

158158
For TypeScript projects:
159159

docs/content/docs/proxy-guide/get-started.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ Before setting up the proxy, ensure you have:
2525

2626
Rybbit uses several endpoints for tracking. You can choose between a minimal setup or full proxy:
2727

28-
<Tabs>
29-
<Tab value="minimal" title="Minimal Setup">
28+
<Tabs items={['Minimal Setup', 'Full Setup (Recommended)']}>
29+
<Tab>
3030

3131
**Required endpoints for basic tracking:**
3232

@@ -38,7 +38,7 @@ Rybbit uses several endpoints for tracking. You can choose between a minimal set
3838
This minimal setup enables basic pageview and event tracking, but won't support session replay or some advanced features.
3939

4040
</Tab>
41-
<Tab value="full-setup-recommended" title="Full Setup (Recommended)">
41+
<Tab>
4242

4343
**All endpoints for complete functionality:**
4444

@@ -239,8 +239,8 @@ Configure your proxy to maintain persistent connections to Rybbit's backend to r
239239

240240
## Common Proxy Patterns
241241

242-
<Tabs>
243-
<Tab value="subdomain-proxy" title="Subdomain Proxy">
242+
<Tabs items={['Subdomain Proxy', 'Path-Based Proxy']}>
243+
<Tab>
244244

245245
Use a dedicated subdomain for analytics:
246246

@@ -259,7 +259,7 @@ https://analytics.yourdomain.com/track → https://app.rybbit.io/api/track
259259
- Need to manage subdomain DNS
260260

261261
</Tab>
262-
<Tab value="path-based-proxy" title="Path-Based Proxy">
262+
<Tab>
263263

264264
Use a path on your main domain:
265265

docs/content/docs/proxy-guide/next-js.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ Next.js rewrites allow you to map incoming request paths to different destinatio
3535

3636
Create or update your `.env` or `.env.local` file with your Rybbit instance URL:
3737

38-
<Tabs>
39-
<Tab value="cloud-hosted" title="Cloud Hosted">
38+
<Tabs items={['Cloud Hosted', 'Self-Hosted']}>
39+
<Tab>
4040

4141
```bash
4242
# .env.local
4343
NEXT_PUBLIC_RYBBIT_HOST=https://app.rybbit.io
4444
```
4545

4646
</Tab>
47-
<Tab value="self-hosted" title="Self-Hosted">
47+
<Tab>
4848

4949
```bash
5050
# .env.local
@@ -64,8 +64,8 @@ The `NEXT_PUBLIC_` prefix makes this environment variable available in both serv
6464

6565
Add or update the `rewrites` function in your `next.config.js` (or `next.config.mjs` for ESM):
6666

67-
<Tabs>
68-
<Tab value="full-proxy-recommended" title="Full Proxy (Recommended)">
67+
<Tabs items={['Full Proxy (Recommended)', 'Minimal Proxy', 'ESM (next.config.mjs)']}>
68+
<Tab>
6969

7070
This configuration proxies all Rybbit endpoints including session replay and Web Vitals:
7171

@@ -120,7 +120,7 @@ module.exports = nextConfig;
120120
```
121121

122122
</Tab>
123-
<Tab value="minimal-proxy" title="Minimal Proxy">
123+
<Tab>
124124

125125
Minimal setup with just script loading and basic event tracking:
126126

@@ -157,7 +157,7 @@ This minimal setup won't support session replay or Web Vitals. Use the full prox
157157
</Callout>
158158

159159
</Tab>
160-
<Tab value="esm-nextconfigmjs" title="ESM (next.config.mjs)">
160+
<Tab>
161161

162162
If you're using ES modules:
163163

@@ -220,8 +220,8 @@ export default nextConfig;
220220

221221
Update your script tag to load from the proxied path instead of directly from Rybbit:
222222

223-
<Tabs>
224-
<Tab value="app-router-nextjs-13" title="App Router (Next.js 13+)">
223+
<Tabs items={['App Router (Next.js 13+)', 'Pages Router', 'JavaScript (No TypeScript)']}>
224+
<Tab>
225225

226226
Update your root layout file:
227227

@@ -252,7 +252,7 @@ export default function RootLayout({
252252
Replace `YOUR_SITE_ID` with your actual site ID from the Rybbit dashboard.
253253

254254
</Tab>
255-
<Tab value="pages-router" title="Pages Router">
255+
<Tab>
256256

257257
Update your `_app.tsx` or `_app.jsx` file:
258258

@@ -280,7 +280,7 @@ export default MyApp;
280280
Replace `YOUR_SITE_ID` with your actual site ID from the Rybbit dashboard.
281281

282282
</Tab>
283-
<Tab value="javascript-no-typescript" title="JavaScript (No TypeScript)">
283+
<Tab>
284284

285285
```jsx
286286
// app/layout.js or pages/_app.js

docs/content/docs/proxy-guide/nginx.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ Nginx's `proxy_pass` directive lets you forward requests from your domain to Ryb
3636

3737
Add a new location block (or update existing configuration) in your Nginx site configuration:
3838

39-
<Tabs>
40-
<Tab value="full-proxy-recommended" title="Full Proxy (Recommended)">
39+
<Tabs items={['Full Proxy (Recommended)', 'Minimal Proxy', 'With Cache Zone']}>
40+
<Tab>
4141

4242
```nginx
4343
# /etc/nginx/sites-available/yourdomain.com
@@ -150,7 +150,7 @@ Replace `app.rybbit.io` with your self-hosted Rybbit instance URL if you're not
150150
</Callout>
151151

152152
</Tab>
153-
<Tab value="minimal-proxy" title="Minimal Proxy">
153+
<Tab>
154154

155155
Minimal configuration for basic tracking:
156156

@@ -187,7 +187,7 @@ server {
187187
```
188188

189189
</Tab>
190-
<Tab value="with-cache-zone" title="With Cache Zone">
190+
<Tab>
191191

192192
For better performance with caching, define a cache zone:
193193

0 commit comments

Comments
 (0)