-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.ts
More file actions
445 lines (416 loc) · 20.7 KB
/
next.config.ts
File metadata and controls
445 lines (416 loc) · 20.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
import type { NextConfig } from "next";
import dedupRedirects from "./scripts/dedup-redirects.json";
const securityHeaders = [
{ key: "X-Frame-Options", value: "DENY" },
{ key: "X-Content-Type-Options", value: "nosniff" },
{ key: "Referrer-Policy", value: "strict-origin-when-cross-origin" },
{
key: "Permissions-Policy",
value: "camera=(), microphone=(), geolocation=(), browsing-topics=()",
},
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
{
key: "Content-Security-Policy",
value: [
"default-src 'self'",
// Next.js requires unsafe-inline for hydration scripts; unsafe-eval for dev HMR
"script-src 'self' 'unsafe-inline' 'unsafe-eval' https://www.googletagmanager.com https://www.google-analytics.com https://app.cal.com https://va.vercel-scripts.com",
"style-src 'self' 'unsafe-inline'",
// Images come from many external CDNs across 665 blog posts
"img-src 'self' data: https:",
"font-src 'self'",
// API calls: Vercel Analytics/Speed Insights, GA4, Buttondown newsletter
"connect-src 'self' https://vitals.vercel-insights.com https://va.vercel-scripts.com https://www.google-analytics.com https://region1.google-analytics.com https://analytics.google.com https://api.buttondown.email https://formspree.io",
// Cal.com booking embed + YouTube/Instagram MDX embeds
"frame-src https://cal.com https://app.cal.com https://www.youtube.com https://www.instagram.com",
"object-src 'none'",
"base-uri 'self'",
].join("; "),
},
];
const nextConfig: NextConfig = {
async headers() {
return [{ source: "/(.*)", headers: securityHeaders }];
},
images: {
remotePatterns: [
// Webflow CDN (current image hosting)
{ protocol: "https", hostname: "cdn.prod.website-files.com" },
{ protocol: "https", hostname: "uploads-ssl.webflow.com" },
// WordPress
{ protocol: "https", hostname: "fvcproductions39789812.wordpress.com" },
{ protocol: "https", hostname: "fvcproductions.files.wordpress.com" },
// Common external image hosts found in blog content
{ protocol: "https", hostname: "i.stack.imgur.com" },
{ protocol: "https", hostname: "cdn-images-1.medium.com" },
{ protocol: "https", hostname: "images.pexels.com" },
{ protocol: "https", hostname: "media.githubusercontent.com" },
{ protocol: "https", hostname: "pbs.twimg.com" },
{ protocol: "https", hostname: "i.ytimg.com" },
{ protocol: "https", hostname: "github.com" },
{ protocol: "https", hostname: "avatars.githubusercontent.com" },
{ protocol: "https", hostname: "encrypted-tbn0.gstatic.com" },
{ protocol: "https", hostname: "www.scdn.co" },
{ protocol: "https", hostname: "www.themebeta.com" },
{ protocol: "https", hostname: "tf-assets-prod.s3.amazonaws.com" },
{ protocol: "https", hostname: "s3-us-west-2.amazonaws.com" },
{ protocol: "https", hostname: "knightfoundation.imgix.net" },
{ protocol: "https", hostname: "ph-files.imgix.net" },
{ protocol: "https", hostname: "raw.githubusercontent.com" },
{ protocol: "https", hostname: "logo.clearbit.com" },
{ protocol: "https", hostname: "www.apprenticeships.me" },
{ protocol: "https", hostname: "static1.squarespace.com" },
{ protocol: "https", hostname: "www.engjobsearch.com" },
{ protocol: "https", hostname: "ktebrbhzg9wasky1.public.blob.vercel-storage.com" },
// Vercel Blob (new store, migrated 2025)
{ protocol: "https", hostname: "gzqhczl3ehdy3foa.public.blob.vercel-storage.com" },
],
},
async redirects() {
return [
// ── Unified /posts namespace ───────────────────────────
// More specific blog post exceptions must come BEFORE the wildcard catch-all
// Mentee posts → /mentoring (must be before the /blog/:slug wildcard)
...[
"abel-regaldo", "adil-minocherhomjee", "adilene-constante", "amber-sharma",
"brenda-sukh", "brian-martinez", "carly-gordon", "cherri-hartigan",
"enrique-novoa", "eunji-song", "jasmine-anderson", "kanad-bahalkar",
"kelaiya-parikah", "lavie-ruan", "linda-xiong", "lupita-davila",
"mariela-p-smith", "matthew-ma", "maximilian-hofer", "melhjingoy-david",
"mike-jonas", "neil-scheuermann", "oscar-parra", "pak-chu",
"paul-do", "pauly-quintero", "ronnie-brown", "roya-lofti",
"simran-anand", "simran-kaur-anand", "steven-shen",
"theerut-foongkiatcharoen", "undisclosed-female", "undisclosed-male",
"valeria-oshiro", "wen-tran",
].map((slug) => ({
source: `/blog/${slug}`,
destination: "/mentoring",
permanent: true,
})),
{ source: "/blog/chris-lanus", destination: "/testimonials/chris-lanus", permanent: true },
{ source: "/blog/gabriel-rowe", destination: "/testimonials/gabriel-rowe", permanent: true },
{ source: "/blog/franklin-lee", destination: "/testimonials/franklin-lee", permanent: true },
{ source: "/blog/angel-riera", destination: "/testimonials/angel-riera", permanent: true },
// Hugo/WordPress date-based blog URLs: /blog/YYYY/MM/DD/slug → /posts/slug
// (top-level /:year/:month/:day/:slug is handled separately below)
{ source: "/blog/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})/:slug", destination: "/posts/:slug", permanent: true },
{ source: "/blog/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})/:slug/", destination: "/posts/:slug", permanent: true },
{ source: "/blog/:slug", destination: "/posts/:slug", permanent: true },
{ source: "/projects/:slug", destination: "/posts/:slug", permanent: true },
{ source: "/projects", destination: "/work", permanent: true },
{ source: "/portfolio", destination: "/work", permanent: true },
// ── Deduped project slug redirects ────────────────────
{ source: "/posts/byteboard-candidate-actions", destination: "/posts/client-platform-candidate-actions", permanent: true },
{ source: "/posts/byteboard-interview-hub", destination: "/posts/pre-interview-comms-interview-hub-revamp", permanent: true },
{ source: "/posts/byteboard-skills-report-redesign", destination: "/posts/skills-report-redesign", permanent: true },
{ source: "/posts/byteboard-zero-state-dashboard", destination: "/posts/zero-state-dashboard", permanent: true },
{ source: "/posts/fullstack-academy", destination: "/posts/fullstack-academy-3", permanent: true },
{ source: "/posts/pacific-shores-shuttle", destination: "/posts/pacific-shores-shuttle-app", permanent: true },
// ── /blog and /newsletter → /posts ────────────────────
{ source: "/blog", destination: "/posts", permanent: true },
{ source: "/newsletter", destination: "/posts", permanent: true },
// ── Index routes that redirect to about page sections ─────
{ source: "/experience", destination: "/about#experience", permanent: true },
{ source: "/education", destination: "/about#education", permanent: true },
{ source: "/awards", destination: "/about#awards", permanent: true },
{ source: "/awards/:slug", destination: "/about#awards", permanent: true },
// ── Webflow CMS template URL patterns ─────────────────
{
source: "/detail_blog/:slug",
destination: "/posts/:slug",
permanent: true,
},
{
source: "/detail_testimonials/:slug",
destination: "/testimonials",
permanent: true,
},
{
source: "/detail_organizations/:slug",
destination: "/organizations",
permanent: true,
},
{
source: "/detail_awards/:slug",
destination: "/awards/:slug",
permanent: true,
},
{
source: "/detail_work-experiences/:slug",
destination: "/about",
permanent: true,
},
{
source: "/detail_educational-institutions/:slug",
destination: "/about",
permanent: true,
},
{
source: "/detail_categories/:slug",
destination: "/categories/:slug",
permanent: true,
},
{
source: "/detail_tags/:slug",
destination: "/tags/:slug",
permanent: true,
},
// ── Hugo v2/v3 date-based permalink patterns ──────────
// fvcproductions.com used /:year/:month/:day/:title/
{
source: "/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})/:slug",
destination: "/posts/:slug",
permanent: true,
},
{
source: "/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})/:slug/",
destination: "/posts/:slug",
permanent: true,
},
// Two-segment date patterns (WordPress-style /YYYY/MM/slug)
{
source: "/:year(\\d{4})/:month(\\d{2})/:slug",
destination: "/posts/:slug",
permanent: true,
},
// ── Hugo content directory patterns ───────────────────
// Hugo v2 used content/adventures/; Hugo v3 used /posts/ (now canonical, no redirect needed)
{
source: "/adventures/:slug",
destination: "/posts/:slug",
permanent: true,
},
{
source: "/adventures/:slug/",
destination: "/posts/:slug",
permanent: true,
},
// ── Webflow-only categories (not in new site) ─────────
// These were Webflow CMS category slugs that don't map to any new category.
// Google has indexed them — redirect to /blog to preserve link equity.
{
source: "/categories/cultura",
destination: "/blog",
permanent: true,
},
{
source: "/categories/code-career",
destination: "/blog",
permanent: true,
},
// ── Category consolidation redirects ──────────────────
// mentoring had 0 posts as a category (exists only as a tag)
{ source: "/categories/mentoring", destination: "/categories", permanent: true },
// newsletter folded into blog
{ source: "/categories/newsletter", destination: "/categories/blog", permanent: true },
// programs + philanthropy merged into community
{ source: "/categories/programs", destination: "/categories/community", permanent: true },
{ source: "/categories/philanthropy", destination: "/categories/community", permanent: true },
// ── Tag consolidation redirects ────────────────────────
// canonical: latinx-in-tech
{ source: "/tags/latina-in-tech", destination: "/tags/latinx-in-tech", permanent: true },
// webflow hash-slug duplicates
{ source: "/tags/mentoring-087f7", destination: "/tags/mentoring", permanent: true },
{ source: "/tags/design-systems-c4aed", destination: "/tags/design-systems", permanent: true },
// ── WordPress upload/admin paths ──────────────────────
// Old WordPress file paths — redirect to home so they don't 404 and bleed crawl budget
{
source: "/wp-content/:path*",
destination: "/",
permanent: true,
},
{
source: "/wp-includes/:path*",
destination: "/",
permanent: true,
},
{
source: "/wp-admin/:path*",
destination: "/",
permanent: true,
},
// ── Trailing slash normalization ──────────────────────
{
source: "/blog/:slug/",
destination: "/blog/:slug",
permanent: true,
},
{
source: "/categories/:slug/",
destination: "/categories/:slug",
permanent: true,
},
{
source: "/tags/:slug/",
destination: "/tags/:slug",
permanent: true,
},
// ── RSS / Feed redirects ─────────────────────────────
{
source: "/feed.xml",
destination: "/feed",
permanent: true,
},
{
source: "/rss",
destination: "/feed",
permanent: true,
},
{
source: "/rss.xml",
destination: "/feed",
permanent: true,
},
{
source: "/index.xml",
destination: "/feed",
permanent: true,
},
// ── Old page paths ───────────────────────────────────
{
source: "/hire-me",
destination: "/contact",
permanent: true,
},
{
source: "/resume",
destination: "/about",
permanent: true,
},
{
source: "/colophon",
destination: "/about",
permanent: true,
},
{
source: "/services",
destination: "/mentoring",
permanent: true,
},
// ── Portfolio/Projects → Work ─────────────────────────
{ source: "/blog/hire-me", destination: "/projects/hire-me", permanent: true },
{
source: "/blog/salesforce-day-1-web-campaign",
destination: "/projects/salesforce-day-1-web-campaign",
permanent: true,
},
// ── Duplicate WordPress posts → Webflow canonical slugs ──
{ source: "/blog/im-obsessed-with-labs", destination: "/blog/im-obsessed-with-labs-f3e5b", permanent: true },
{ source: "/blog/mindot-tour", destination: "/blog/mindot-tour-2", permanent: true },
{ source: "/blog/new-epoch-new-exploits-%f0%9f%98%88", destination: "/blog/new-epoch-new-exploits-f0-9f-98-88", permanent: true },
{ source: "/blog/smash-academy-at-stanford-%f0%9f%8e%93", destination: "/blog/smash-academy-at-stanford-f0-9f-8e-93", permanent: true },
// ── Blog posts migrated to projects ──────────────────
{ source: "/blog/fullstack-academy-3", destination: "/projects/fullstack-academy", permanent: true },
// Slack work projects
{ source: "/blog/contact-sales-form", destination: "/projects/contact-sales-form", permanent: true },
{ source: "/blog/slack-interactive-demo-homepage", destination: "/projects/slack-interactive-demo-homepage", permanent: true },
{ source: "/blog/slack-native-app-homepage", destination: "/projects/slack-native-app-homepage", permanent: true },
{ source: "/blog/slack-immersive-homepage", destination: "/projects/slack-immersive-homepage", permanent: true },
{ source: "/blog/slack-simplified-homepage", destination: "/projects/slack-simplified-homepage", permanent: true },
{ source: "/blog/university-recruiting-page", destination: "/projects/university-recruiting-page", permanent: true },
{ source: "/blog/new-enterprise-page", destination: "/projects/slack-enterprise-page", permanent: true },
{ source: "/blog/refreshed-downloads-experience-on-slack-com", destination: "/projects/slack-downloads-page", permanent: true },
{ source: "/blog/slack-partner-referral-form", destination: "/projects/slack-partner-referral-form", permanent: true },
{ source: "/blog/consent-updates-on-slack-com-forms", destination: "/projects/slack-com-consent-updates", permanent: true },
{ source: "/blog/slack-com-webinar-form-registration", destination: "/projects/slack-com-webinar-form", permanent: true },
{ source: "/blog/lists-feature-launch-files-column", destination: "/projects/slack-lists-files-column", permanent: true },
// Byteboard work projects
{ source: "/blog/skills-report-redesign", destination: "/projects/byteboard-skills-report-redesign", permanent: true },
{ source: "/blog/client-platform-candidate-actions", destination: "/projects/byteboard-candidate-actions", permanent: true },
{ source: "/blog/pre-interview-comms-interview-hub-revamp", destination: "/projects/byteboard-interview-hub", permanent: true },
{ source: "/blog/zero-state-dashboard", destination: "/projects/byteboard-zero-state-dashboard", permanent: true },
// Techqueria projects
{ source: "/blog/techquerias-job-board", destination: "/projects/techqueria-job-board", permanent: true },
// ── Projects moved from /experience to /projects ─────
{ source: "/experience/latina-dev", destination: "/projects/latina-dev", permanent: true },
{ source: "/experience/apprenticeships-me", destination: "/projects/apprenticeships-me", permanent: true },
{ source: "/experience/tech-queens", destination: "/projects/tech-queens", permanent: true },
{ source: "/experience/jake-the-dog-key-hand", destination: "/projects/jake-the-dog-key-hand", permanent: true },
{ source: "/experience/meggs-design-hackathon-2016", destination: "/projects/meggs-design-hackathon-2016", permanent: true },
{ source: "/experience/ammalia-treehacks-2016", destination: "/projects/ammalia-treehacks-2016", permanent: true },
{ source: "/experience/salesforce-day-1-web-campaign", destination: "/projects/salesforce-day-1-web-campaign", permanent: true },
// ── Experience/Education blog posts → detail pages ────
{
source: "/blog/slack-swe",
destination: "/experience/slack-customer-acquisition",
permanent: true,
},
{
source: "/blog/accenture-liquid-studio-summer-2016",
destination: "/experience/accenture-intern",
permanent: true,
},
{
source: "/blog/8020-software-consulting",
destination: "/experience/8020-software-consulting",
permanent: true,
},
{
source: "/blog/cornell-tech",
destination: "/education/cornell-tech",
permanent: true,
},
{
source: "/blog/hampton-university",
destination: "/education/hampton-university",
permanent: true,
},
{
source: "/blog/jacobs-university-bremen-fall-2013",
destination: "/education/jacobs-university-bremen",
permanent: true,
},
{
source: "/blog/hampton-university-summer-2011",
destination: "/education/hampton-university-summer-2011",
permanent: true,
},
{
source: "/blog/hampton-university-summer-2014",
destination: "/education/hampton-university-summer-2014",
permanent: true,
},
{
source: "/blog/old-dominion-university-summer-2014",
destination: "/education/old-dominion-university-summer-2014",
permanent: true,
},
{
source: "/blog/tidewater-community-college-summer-2010",
destination: "/education/tidewater-community-college-summer-2010",
permanent: true,
},
{
source: "/blog/tidewater-community-college-summer-2013",
destination: "/education/tidewater-community-college-summer-2013",
permanent: true,
},
// ── Skills pages (no /skills/ route exists) ──────────
{ source: "/skills/:slug", destination: "/about", permanent: true },
// ── Missing category redirects ────────────────────────
// "experience" was a Webflow-only category not in the new site
{ source: "/categories/experience", destination: "/about#experience", permanent: true },
{ source: "/categories/experience/:rest*", destination: "/about#experience", permanent: true },
// ── Missing organization redirects ───────────────────
{ source: "/organizations/apprenticeships-me", destination: "/posts/apprenticeships-me", permanent: true },
{ source: "/organizations/onramp", destination: "/mentoring", permanent: true },
// ── Podcast (Tech Queens) route ──────────────────────
{ source: "/podcast/:slug", destination: "/posts/:slug", permanent: true },
{ source: "/podcast", destination: "/posts", permanent: true },
// ── Old Webflow AI writing tool pages ────────────────
{ source: "/tone-voice", destination: "/", permanent: true },
{ source: "/slack-summary", destination: "/", permanent: true },
{ source: "/pr-description", destination: "/", permanent: true },
{ source: "/slack-message", destination: "/", permanent: true },
{ source: "/code-review", destination: "/", permanent: true },
{ source: "/slack-project-update", destination: "/", permanent: true },
{ source: "/slack-draft", destination: "/", permanent: true },
// ── Dedup redirects: old slugs → canonical slugs ──────
...dedupRedirects,
];
},
};
export default nextConfig;