Skip to content

Commit 95af193

Browse files
committed
feat: update Netlify configuration to remove redirects and add prerendering rules
1 parent 9c07174 commit 95af193

2 files changed

Lines changed: 23 additions & 4 deletions

File tree

netlify.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[build]
2+
publish = ".output/public"
3+
command = "pnpm run generate"
4+
5+
# PostHog reverse proxy for analytics
6+
[[redirects]]
7+
from = "/ph/static/*"
8+
to = "https://eu-assets.i.posthog.com/static/:splat"
9+
status = 200
10+
force = true
11+
12+
[[redirects]]
13+
from = "/ph/*"
14+
to = "https://eu.i.posthog.com/:splat"
15+
status = 200
16+
force = true
17+
18+
# Legacy redirect
19+
[[redirects]]
20+
from = "/gitcheatsheet"
21+
to = "/goodies/gitcheatsheet"
22+
status = 301

nuxt.config.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,10 @@ export default defineNuxtConfig({
5252
}
5353
},
5454

55-
// Optional: Add route rules for full prerendering
55+
// Route rules for prerendering (proxies handled by Netlify)
5656
routeRules: {
57-
'/ph/static/**': { proxy: 'https://eu-assets.i.posthog.com/static/**' },
58-
'/ph/**': { proxy: 'https://eu.i.posthog.com/**' },
5957
'/**': { prerender: true },
6058
'/api/**': { prerender: true },
61-
'/gitcheatsheet': { redirect: '/goodies/gitcheatsheet', prerender: true },
6259
'/*.rss': { prerender: true },
6360
'/*.atom': { prerender: true }
6461
},

0 commit comments

Comments
 (0)