Skip to content

Commit 33c36a0

Browse files
authored
chore: remove docs hubs, add redirects (#856)
1 parent 75bc05b commit 33c36a0

File tree

40 files changed

+29
-1156
lines changed

40 files changed

+29
-1156
lines changed

β€Žconfig/docusaurus/footer.jsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const footer = {
1515
{
1616
title: "Specs",
1717
items: [
18-
{ label: "Documentation", to: "/docs" },
18+
{ label: "Documentation", to: "/docs/get-started/overview" },
1919
{ label: "Community", to: "/community" },
2020
{ label: "Help", to: "/nav" },
2121
{ label: "Discussions", href: `${GITHUB_DOCS}/discussions` },

β€Žconfig/docusaurus/navbar.jsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const navbar = {
1212
// left
1313
{
1414
label: "πŸ“– Docs",
15-
to: "/docs",
15+
to: "/docs/get-started/overview",
16+
activeBaseRegex: "/docs(/.*)?$",
1617
position: "left",
1718
},
1819
{

β€Žconfig/docusaurus/routes.jsβ€Ž

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,17 @@ const LEGACY_ROUTES = [
124124
{
125125
title: "App splitting",
126126
from: "/docs/concepts/app-splitting",
127-
to: "/docs/reference",
127+
to: "/docs/reference/layers",
128128
},
129129
{
130130
title: "Decomposition",
131131
from: "/docs/reference/units/decomposition",
132-
to: "/docs/reference",
132+
to: "/docs/reference/layers",
133133
},
134134
{
135135
title: "Units",
136136
from: "/docs/reference/units",
137-
to: "/docs/reference",
137+
to: "/docs/reference/layers",
138138
},
139139
{
140140
title: "Layers",
@@ -305,10 +305,19 @@ const SECTIONS_REDIRECTS = Object.values(SECTIONS).map(
305305
}),
306306
);
307307

308+
// Redirects for removed hub/landing pages
309+
const HUB_REDIRECTS = [
310+
{ from: "/docs", to: "/docs/get-started/overview" },
311+
{ from: "/docs/get-started", to: "/docs/get-started/overview" },
312+
{ from: "/docs/guides", to: "/docs/guides/examples/auth" },
313+
{ from: "/docs/guides/examples", to: "/docs/guides/examples/auth" },
314+
{ from: "/docs/reference", to: "/docs/reference/layers" },
315+
{ from: "/docs/about", to: "/docs/about/mission" },
316+
];
317+
308318
// !!! FIXME: refactor later!
309319
// UPD: Removed new docs routes for simplifying
310320
const _TOTAL_ROUTES = [
311-
"/docs/about",
312321
"/docs/about/alternatives",
313322
"/docs/about/mission",
314323
"/docs/about/motivation",
@@ -317,13 +326,10 @@ const _TOTAL_ROUTES = [
317326
"/docs/about/promote/integration",
318327
"/docs/about/promote/partial-application",
319328
"/docs/branding",
320-
"/docs/get-started",
321329
"/docs/get-started/overview",
322330
"/docs/get-started/cheatsheet",
323331
"/docs/get-started/faq",
324332
"/docs/get-started/tutorial",
325-
"/docs/guides",
326-
"/docs/guides/examples",
327333
"/docs/guides/examples/auth",
328334
"/docs/guides/examples/autocompleted",
329335
"/docs/guides/examples/browser-api",
@@ -341,8 +347,6 @@ const _TOTAL_ROUTES = [
341347
"/docs/guides/migration/from-custom",
342348
"/docs/guides/migration/from-v1",
343349
"/docs/guides/tech/with-nextjs",
344-
"/docs/",
345-
"/docs/reference",
346350
];
347351
// from: "/en/docs/*" to "/docs/*"
348352
const I18N_REDIRECTS = _TOTAL_ROUTES.map((route) => ({
@@ -355,6 +359,7 @@ const REDIRECTS = [
355359
...SECTIONS_REDIRECTS,
356360
...LEGACY_ROUTES_REDIRECTS,
357361
...I18N_REDIRECTS,
362+
...HUB_REDIRECTS,
358363
];
359364

360365
module.exports = {

β€Žconfig/docusaurus/sidebars.docs.jsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ const getSidebar = (category) => [
2525
{
2626
type: "category",
2727
label: CATEGORIES[category],
28-
link: { type: "doc", id: `${category}/index` },
2928
items: [{ type: "autogenerated", dirName: category }],
3029
collapsible: false,
3130
},

β€Ži18n/en/docusaurus-plugin-content-docs/current/about/index.mdxβ€Ž

Lines changed: 0 additions & 44 deletions
This file was deleted.

β€Ži18n/en/docusaurus-plugin-content-docs/current/get-started/faq.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
sidebar_position: 20
3-
pagination_next: guides/index
3+
pagination_next: guides/examples/auth
44
---
55

66
# FAQ

β€Ži18n/en/docusaurus-plugin-content-docs/current/get-started/index.mdxβ€Ž

Lines changed: 0 additions & 38 deletions
This file was deleted.

β€Ži18n/en/docusaurus-plugin-content-docs/current/guides/examples/index.mdxβ€Ž

Lines changed: 0 additions & 36 deletions
This file was deleted.

β€Ži18n/en/docusaurus-plugin-content-docs/current/guides/index.mdxβ€Ž

Lines changed: 0 additions & 46 deletions
This file was deleted.

β€Ži18n/en/docusaurus-plugin-content-docs/current/guides/issues/cross-imports.mdxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
sidebar_position: 4
33
sidebar_class_name: sidebar-item--wip
4-
pagination_next: reference/index
4+
pagination_next: reference/layers
55
---
66

77
import WIP from '@site/src/shared/ui/wip/tmpl.mdx'

0 commit comments

Comments
Β (0)