refactor: tabs

This commit is contained in:
0xSage 2023-09-20 14:03:05 +08:00
parent b98dfde7a7
commit ca677f2411
22 changed files with 79 additions and 53 deletions

View File

@ -1,7 +1,6 @@
--- ---
sidebar_position: 1 sidebar_position: 1
title: Getting Started title: Getting Started
slug: /guides
--- ---
TODO TODO

View File

@ -1,5 +1,3 @@
--- ---
sidebar_position: 1 title: Features
title: Overview ---
slug: /features
---

View File

@ -1,6 +0,0 @@
---
sidebar_position: 1
title: Installing Jan
slug: /install
---

View File

@ -0,0 +1,5 @@
---
sidebar_position: 1
title: Overview
slug: /platform
---

View File

@ -1,4 +0,0 @@
---
title: Platform
slug: /platform
---

View File

@ -0,0 +1,4 @@
---
title: Products
slug: /product
---

View File

@ -1,3 +0,0 @@
---
title: Enterprise AI Platform
---

View File

@ -0,0 +1,3 @@
---
title: Education
---

View File

@ -0,0 +1,3 @@
---
title: Finance
---

View File

@ -0,0 +1,3 @@
---
title: Healthcare
---

View File

@ -0,0 +1,3 @@
---
title: Law
---

View File

@ -0,0 +1,3 @@
---
title: Public Sector
---

View File

@ -0,0 +1,3 @@
---
title: Self-hosted ChatGPT
---

View File

@ -1,4 +1,4 @@
--- ---
title: Solutions title: Overview
slug: /solutions slug: /solutions
--- ---

View File

@ -48,7 +48,6 @@ const config = {
sidebarPath: require.resolve('./sidebars.js'), sidebarPath: require.resolve('./sidebars.js'),
editUrl: editUrl:
'https://github.com/janhq/jan/tree/main/docs', 'https://github.com/janhq/jan/tree/main/docs',
sidebarCollapsed: false,
showLastUpdateAuthor: true, showLastUpdateAuthor: true,
showLastUpdateTime: true, showLastUpdateTime: true,
}, },
@ -109,13 +108,19 @@ const config = {
type: 'docSidebar', type: 'docSidebar',
sidebarId: 'featuresSidebar', sidebarId: 'featuresSidebar',
position: 'left', position: 'left',
label: 'Features', label: 'Platform',
}, },
{ {
type: 'docSidebar', type: 'docSidebar',
sidebarId: 'guidesSidebar', sidebarId: 'solutionsSidebar',
position: 'left', position: 'left',
label: 'Guides', label: 'Use Cases',
},
{
type: 'docSidebar',
sidebarId: 'docsSidebar',
position: 'left',
label: 'Docs',
}, },
{ {
type: 'docSidebar', type: 'docSidebar',

View File

@ -20,64 +20,74 @@ const sidebars = {
// But you can create a sidebar manually // But you can create a sidebar manually
featuresSidebar: [ featuresSidebar: [
'features/features', 'platform/platform',
{ {
type: 'category', type: 'category',
label: 'Platforms', label: 'Products',
collapsible: true, collapsible: true,
collapsed: true, collapsed: false,
link: { type: 'doc', id: 'platforms/platform' }, link: { type: 'doc', id: 'products/products' },
items: [ items: [
'platforms/desktop', 'products/desktop',
'platforms/mobile', 'products/mobile',
'platforms/server' 'products/server'
] ]
}, },
{ {
type: 'category', type: 'category',
label: 'Features', label: 'Features',
collapsible: true, collapsible: true,
collapsed: true, collapsed: false,
link: { type: 'doc', id: 'features/features' },
items: [ items: [
'features/self-hosted', 'features/self-hosted',
'features/acceleration', 'features/acceleration',
'features/extensions',
]
}
],
// Note: Tab name is "Use Cases"
solutionsSidebar: [
'solutions/solutions',
{
type: 'category',
label: 'Use cases',
collapsible: true,
collapsed: false,
items: [
'solutions/personal-ai',
'solutions/self-hosted'
] ]
}, },
{ {
type: 'category', type: 'category',
label: 'Solutions', label: 'Industries',
collapsible: true, collapsible: true,
collapsed: true, collapsed: false,
items: [ items: [
'solutions/personal-ai', 'solutions/industries/public-sector',
'solutions/enterprise' 'solutions/industries/education',
'solutions/industries/finance',
'solutions/industries/law',
'solutions/industries/healthcare',
] ]
}, }
], ],
guidesSidebar: [ docsSidebar: [
{ type: 'doc', label: "Overview", id: 'guides/guides' }, { type: 'doc', label: "Getting Started", id: 'docs/docs' },
{ {
type: 'category', type: 'category',
label: 'Install', label: 'Install',
collapsible: true, collapsible: true,
collapsed: true, collapsed: false,
items: [ items: [
{ type: 'doc', label: 'Overview', id: 'guides/install/install' }, { type: 'doc', label: 'Windows', id: 'docs/install/windows' },
{ type: 'doc', label: 'Windows', id: 'guides/install/windows' }, { type: 'doc', label: 'Mac', id: 'docs/install/mac' },
{ type: 'doc', label: 'Mac', id: 'guides/install/mac' }, { type: 'doc', label: 'Linux', id: 'docs/install/linux' },
{ type: 'doc', label: 'Linux', id: 'guides/install/linux' },
] ]
}, }
{
type: 'category',
label: 'Running as Server',
collapsible: true,
collapsed: true,
items: [
{ type: 'doc', label: 'Overview', id: 'guides/install/install' },
]
},
] ]
}; };