Skip to content

Commit

Permalink
fix(redirects): do root redirects for paths
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoamui committed Jan 1, 2023
1 parent b5d71b4 commit 82cd066
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion getPEM.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
[ ! -f .env.local ] || set -a && source .env.local && set +a
if [ "$NETLIFY" = true ]; then
echo 'Build On Netlify, writing PEM File'
printenv GITHUB_PRIVATEKEY | base64 -d >github.pem
else
echo 'Build Not On Netlify, writing PEM File'
printenv GITHUB_PRIVATEKEY >github.pem
printenv GITHUB_PRIVATEKEY | sed 's/\\n/\n/g' > github.pem
fi
27 changes: 26 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,29 @@ const nextConfig = {
destination: '/docs/guides/:slug',
permanent: true,
},
{
source: '/vtex-rest-api/docs',
destination: '/docs/guides',
permanent: true,
},
{
source: '/vtex-developer-docs/docs/:slug',
destination: '/docs/guides/:slug',
permanent: true,
},
{
source: '/vtex-developer-docs/docs',
destination: '/docs/guides',
permanent: true,
},
{
source: '/vtex-developer-docs/changelog/:slug',
destination: '/docs/guides/:slug',
destination: '/updates/release-notes/:slug',
permanent: true,
},
{
source: '/vtex-developer-docs/changelog',
destination: '/updates/release-notes',
permanent: true,
},
{
Expand All @@ -65,6 +80,16 @@ const nextConfig = {
destination: '/docs/api-reference/:slug*',
permanent: true,
},
{
source: '/vtex-rest-api/reference',
destination: '/docs/api-reference',
permanent: true,
},
{
source: '/vtex-developer-docs/reference',
destination: '/docs/api-reference',
permanent: true,
},
]
},
}
Expand Down

0 comments on commit 82cd066

Please sign in to comment.