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 e6a40f9
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 68 deletions.
137 changes: 69 additions & 68 deletions site.redirects.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,48 +109,49 @@ 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
{
to: '/developers/weaviate/starter-guides/schema',
from: '/developers/weaviate/current/quickstart/schema',
},
{
to: '/developers/weaviate/tutorials/import',
from: '/developers/weaviate/current/quickstart/import',
},
{
to: '/developers/weaviate/tutorials/query',
from: '/developers/weaviate/current/quickstart/query',
},
{
to: '/developers/weaviate/tutorials/modules',
from: '/developers/weaviate/current/quickstart/modules',
},
{
to: '/developers/wcs/tools/query-tool',
from: '/developers/weaviate/current/quickstart/console',
},
/// ###???
// {
// to: '/developers/weaviate/starter-guides/schema',
// from: '/developers/weaviate/current/quickstart/schema',
// },
// {
// to: '/developers/weaviate/tutorials/import',
// from: '/developers/weaviate/current/quickstart/import',
// },
// {
// to: '/developers/weaviate/tutorials/query',
// from: '/developers/weaviate/current/quickstart/query',
// },
// {
// to: '/developers/weaviate/tutorials/modules',
// from: '/developers/weaviate/current/quickstart/modules',
// },
// {
// to: '/developers/wcs/tools/query-tool',
// from: '/developers/weaviate/current/quickstart/console',
// },

// WCD redirects
{
Expand Down Expand Up @@ -553,10 +554,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 @@ -823,14 +824,14 @@ const siteRedirects = {
),
];
}
if (existingPath.includes('/weaviate/quickstart')) {
return [
existingPath.replace(
'/weaviate/quickstart',
'/weaviate/current/getting-started'
),
];
}
// if (existingPath.includes('/weaviate/quickstart')) {
// return [
// existingPath.replace(
// '/weaviate/quickstart',
// '/weaviate/current/getting-started'
// ),
// ];
// }

// Any remaining weaviate docs redirects
if (existingPath.includes('/developers/weaviate')) {
Expand All @@ -843,22 +844,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
29 changes: 29 additions & 0 deletions static/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
###==================== QUICKSTART ====================

[[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"

[[redirects]]
from = "/weaviate/current/getting-started"
to = "/weaviate/quickstart/:splat"

0 comments on commit e6a40f9

Please sign in to comment.