Skip to content

Commit

Permalink
Add redirectd from / pages for docs and dashboard (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentaTomas authored Aug 23, 2023
2 parents d840730 + 2e565be commit cb733a8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 8 additions & 1 deletion apps/dashboard/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ const nextConfig = {
source: '/ingest/:path*',
destination: 'https://app.posthog.com/:path*',
},
]
},
async redirects() {
return [
// This is for local development and vercel previews - otherwise you would have to always add /dashboard to the url
{
source: '/',
destination: '/dashboard',
},
permanent: false,
basePath: false,
}
]
}
}
Expand Down
5 changes: 4 additions & 1 deletion apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ const withMDX = nextMDX({
const nextConfig = {
pageExtensions: ['js', 'jsx', 'ts', 'tsx', 'mdx'],
basePath: '/docs',
async rewrites() {
async redirects() {
return [
// This is for local development and vercel previews - otherwise you would have to always add /docs to the url
{
source: '/',
destination: '/docs',
permanent: false,
basePath: false,
}
]
}
Expand Down

1 comment on commit cb733a8

@vercel
Copy link

@vercel vercel bot commented on cb733a8 Aug 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

e2b-docs – ./apps/docs

e2b-docs-git-main-e2b.vercel.app
e2b-docs.vercel.app
e2b-docs-e2b.vercel.app

Please sign in to comment.