Skip to content

Commit

Permalink
Update netlify redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
sebawita committed Dec 10, 2024
1 parent 5f9060c commit 4d07518
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 40 deletions.
80 changes: 40 additions & 40 deletions site.redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,26 @@ const siteRedirects = {
},

// Quickstart redirects
{
to: '/developers/weaviate/starter-guides/schema',
from: '/developers/weaviate/quickstart/schema',
},
{
to: '/developers/weaviate/tutorials/import',
from: '/developers/weaviate/quickstart/import',
},
{
to: '/developers/weaviate/tutorials/query',
from: '/developers/weaviate/quickstart/query',
},
{
to: '/developers/weaviate/tutorials/modules',
from: '/developers/weaviate/quickstart/modules',
},
{
to: '/developers/wcs/tools/query-tool',
from: '/developers/weaviate/quickstart/console',
},
// {
// to: '/developers/weaviate/starter-guides/schema',
// from: '/developers/weaviate/quickstart/schema',
// },
// {
// to: '/developers/weaviate/tutorials/import',
// from: '/developers/weaviate/quickstart/import',
// },
// {
// to: '/developers/weaviate/tutorials/query',
// from: '/developers/weaviate/quickstart/query',
// },
// {
// to: '/developers/weaviate/tutorials/modules',
// from: '/developers/weaviate/quickstart/modules',
// },
// {
// to: '/developers/wcs/tools/query-tool',
// from: '/developers/weaviate/quickstart/console',
// },

// Old Quickstart redirects
{
Expand Down Expand Up @@ -553,10 +553,10 @@ const siteRedirects = {


// moved Quickstart installation to Quickstart
{
to: '/developers/weaviate/quickstart',
from: '/developers/weaviate/quickstart/installation',
},
// {
// to: '/developers/weaviate/quickstart',
// from: '/developers/weaviate/quickstart/installation',
// },

{
to: '/developers/wcs/tools/query-tool',
Expand Down Expand Up @@ -843,22 +843,22 @@ const siteRedirects = {
}

// Contributor Guide redirects
if (existingPath.includes('/contributor-guide/weaviate-modules')) {
return [
existingPath.replace(
'/developers/contributor-guide/weaviate-modules',
'/developers/contributor-guide/current/weaviate-module-system'
),
];
}
if (existingPath.includes('/contributor-guide')) {
return [
existingPath.replace(
'/developers/contributor-guide',
'/developers/contributor-guide/current'
),
];
}
// if (existingPath.includes('/contributor-guide/weaviate-modules')) {
// return [
// existingPath.replace(
// '/developers/contributor-guide/weaviate-modules',
// '/developers/contributor-guide/current/weaviate-module-system'
// ),
// ];
// }
// if (existingPath.includes('/contributor-guide')) {
// return [
// existingPath.replace(
// '/developers/contributor-guide',
// '/developers/contributor-guide/current'
// ),
// ];
// }

return undefined; // Return a falsy value: no redirect created
},
Expand Down
4 changes: 4 additions & 0 deletions static/_redirects
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Redirect from weaviate.io/slack to the slack invite link
# See https://www.notion.so/weaviate/Community-Slack-invite-link-updates-12d70562ccd68034abb9fdfd77cbdc02?pvs=4 for instructions
/slack https://join.slack.com/t/weaviate/shared_invite/zt-2unbjggpv-EUFMAJ9mQa8QK868zLt2YQ


/developers/contributor-guide/current/weaviate-module-system/* /developers/contributor-guide/weaviate-modules/:splat
/developers/contributor-guide/current/* /developers/contributor-guide/:splat
23 changes: 23 additions & 0 deletions static/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[[redirects]]
from = "/developers/weaviate/quickstart/installation"
to = "/developers/weaviate/quickstart"

[[redirects]]
from = "/developers/weaviate/quickstart/schema"
to = "/developers/weaviate/starter-guides/schema"

[[redirects]]
from = "/developers/weaviate/quickstart/console"
to = "/developers/wcs/tools/query-tool"

# redirects for:
# from: '/developers/weaviate/quickstart/import',
# from: '/developers/weaviate/quickstart/query',
# from: '/developers/weaviate/quickstart/modules',
[[redirects]]
from = "/developers/weaviate/quickstart/*"
to = "/developers/weaviate/starter-guides/:splat"

[[redirects]]
from = "/developers/weaviate/current/quickstart"
to = "/developers/weaviate/quickstart/:splat"

0 comments on commit 4d07518

Please sign in to comment.