Skip to content

Commit b91a5db

Browse files
fix(blog): redirect /{tag} to /?tag=${tag} (#7740)
* fix(blog): redirect `/{tag}` to `/?tag=${tag}` * chore(blog): add ai tag to redirect
1 parent 708cd2b commit b91a5db

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

apps/blog/next.config.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,30 @@ const allowedDevOrigins = (
205205
const config = {
206206
reactCompiler: true,
207207
async redirects() {
208+
const tagSlugs = [
209+
"ai",
210+
"announcement",
211+
"data-platform",
212+
"education",
213+
"orm",
214+
"prisma-postgres",
215+
"release",
216+
"serverless",
217+
"user-success-story",
218+
];
219+
208220
return [
209221
{
210222
source: "/",
211223
destination: "/blog",
212224
permanent: false,
213225
basePath: false,
214226
},
227+
...tagSlugs.map((tag) => ({
228+
source: `/${tag}`,
229+
destination: `/?tag=${tag}`,
230+
permanent: true,
231+
})),
215232
];
216233
},
217234
async rewrites() {

0 commit comments

Comments
 (0)