Refactor Docs

This commit is contained in:
daniel 2023-09-19 22:59:03 +08:00
parent f8657a8a31
commit b98dfde7a7
30 changed files with 180 additions and 14271 deletions

View File

@ -1,5 +0,0 @@
---
title: Story
---
TODO: a month by month recap

View File

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

View File

@ -1,7 +0,0 @@
{
"label": "Company",
"position": 2,
"link": {
"type": "generated-index"
}
}

View File

@ -1,6 +1,6 @@
{
"label": "Handbook",
"position": 5,
"position": 4,
"link": {
"type": "generated-index"
}

View File

@ -1,6 +1,6 @@
{
"label": "Roadmap",
"position": 4,
"position": 3,
"link": {
"type": "generated-index"
}

View File

@ -1,6 +1,6 @@
{
"label": "Strategy",
"position": 3,
"position": 2,
"link": {
"type": "generated-index"
}

View File

@ -0,0 +1,3 @@
---
title: Hardware Acceleration
---

View File

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

View File

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

View File

@ -0,0 +1,7 @@
---
title: Self-Hosted AI
---
- Privacy
- Offline-ready
- Fixed cost

View File

@ -1,20 +0,0 @@
---
sidebar_position: 1
title: Getting Started
slug: /
---
Hi there
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
<Tabs groupId="operating-systems">
<TabItem value="win" label="Windows">Use Ctrl + C to copy.</TabItem>
<TabItem value="mac" label="macOS">Use Command + C to copy.</TabItem>
</Tabs>
<Tabs groupId="operating-systems">
<TabItem value="win" label="Windows">Use Ctrl + V to paste.</TabItem>
<TabItem value="mac" label="macOS">Use Command + V to paste.</TabItem>
</Tabs>

View File

@ -1,4 +0,0 @@
---
sidebar_position: 1
title: Glossary
---

View File

@ -1,6 +0,0 @@
---
sidebar_position: 1
title: Guides
---
TODO

View File

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

View File

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

View File

@ -0,0 +1,3 @@
---
title: Installing Jan on Linux
---

View File

@ -0,0 +1,3 @@
---
title: Installing Jan on Linux
---

View File

@ -0,0 +1,3 @@
---
title: Installing Jan on Linux
---

View File

@ -1,6 +0,0 @@
---
sidebar_position: 1
title: Integrations
---
TODO

View File

@ -0,0 +1,3 @@
---
title: Jan Desktop
---

View File

@ -0,0 +1,3 @@
---
title: Jan Mobile
---

View File

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

View File

@ -0,0 +1,3 @@
---
title: Jan Server
---

View File

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

View File

@ -0,0 +1,3 @@
---
title: Personal AI
---

View File

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

View File

@ -6,12 +6,12 @@ const darkCodeTheme = require('prism-react-renderer/themes/dracula');
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'Jan Documentation',
tagline: 'Self-hosted AI inference platform',
title: 'Jan',
tagline: 'Run your own AI',
favicon: 'img/favicon.ico',
// Set the production url of your site here
url: 'https://docs.jan.ai',
url: 'https://jan.ai',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
@ -21,7 +21,7 @@ const config = {
organizationName: 'janhq', // Usually your GitHub org/user name.
projectName: 'jan', // Usually your repo name.
onBrokenLinks: 'ignore',
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
// Even if you don't use internalization, you can use this field to set useful
@ -54,8 +54,8 @@ const config = {
},
// Will be passed to @docusaurus/plugin-content-sitemap (false to disable)
sitemap: {
changefreq: 'weekly',
priority: 0.5,
changefreq: 'daily',
priority: 1.0,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
},
@ -76,7 +76,7 @@ const config = {
specs: [
{
spec: 'openapi/OpenAPISpec.json', // can be local file, url, or parsed json object
route: '/reference/',
route: '/api/',
},
],
theme: {
@ -98,18 +98,18 @@ const config = {
playgroundPosition: 'bottom',
},
navbar: {
title: 'Jan Docs',
title: 'Jan',
logo: {
alt: 'Jan Logo',
src: 'img/logo.svg',
},
items: [
// Navbar left
// Navbar Top
{
type: 'docSidebar',
sidebarId: 'quickstartSidebar',
sidebarId: 'featuresSidebar',
position: 'left',
label: 'Getting Started',
label: 'Features',
},
{
type: 'docSidebar',
@ -124,15 +124,9 @@ const config = {
label: 'Hardware',
},
{
type: 'docSidebar',
sidebarId: 'integrationsSidebar',
position: 'left',
label: 'Integrations',
},
{
position: 'left',
label: 'Reference',
to: '/reference',
label: 'API',
to: '/api',
},
// Navbar right
{
@ -167,8 +161,8 @@ const config = {
to: '/developer',
},
{
label: 'Reference',
to: '/reference',
label: 'API',
to: '/api',
},
{
label: 'Changelog',
@ -183,13 +177,9 @@ const config = {
label: 'Discord',
href: 'https://discord.gg/FTk2MvZwJH',
},
{
label: 'Telegram',
href: 'https://t.me/+cSSlxwEM-0piMDQ1',
},
{
label: 'Twitter',
href: 'https://twitter.com/askjanai',
href: 'https://twitter.com/jan_dotai',
},
],
},

14177
docs/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,28 +14,71 @@
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
quickstartSidebar: [{
type: 'autogenerated', dirName: 'getting-started',
}],
guidesSidebar: [{ type: 'autogenerated', dirName: 'guides' }],
// featuresSidebar: [{ type: 'autogenerated', dirName: 'features' }],
hardwareSidebar: [{ type: 'autogenerated', dirName: 'hardware' }],
integrationsSidebar: [{ type: 'autogenerated', dirName: 'integrations' }],
glossarySidebar: [{ type: 'autogenerated', dirName: 'glossary' }],
changelogSidebar: [{ type: 'autogenerated', dirName: 'changelog' }],
aboutSidebar: [{ type: 'autogenerated', dirName: 'about' }],
// But you can create a sidebar manually
/*
tutorialSidebar: [
'intro',
'hello',
featuresSidebar: [
'features/features',
{
type: 'category',
label: 'Tutorial',
items: ['tutorial-basics/create-a-document'],
label: 'Platforms',
collapsible: true,
collapsed: true,
link: { type: 'doc', id: 'platforms/platform' },
items: [
'platforms/desktop',
'platforms/mobile',
'platforms/server'
]
},
{
type: 'category',
label: 'Features',
collapsible: true,
collapsed: true,
items: [
'features/self-hosted',
'features/acceleration',
]
},
{
type: 'category',
label: 'Solutions',
collapsible: true,
collapsed: true,
items: [
'solutions/personal-ai',
'solutions/enterprise'
]
},
],
*/
guidesSidebar: [
{ type: 'doc', label: "Overview", id: 'guides/guides' },
{
type: 'category',
label: 'Install',
collapsible: true,
collapsed: true,
items: [
{ type: 'doc', label: 'Overview', id: 'guides/install/install' },
{ type: 'doc', label: 'Windows', id: 'guides/install/windows' },
{ type: 'doc', label: 'Mac', id: 'guides/install/mac' },
{ 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' },
]
},
]
};
module.exports = sidebars;

41
docs/src/pages/index.js Normal file
View File

@ -0,0 +1,41 @@
import React from 'react';
import clsx from 'clsx';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout';
import HomepageFeatures from '@site/src/components/HomepageFeatures';
import styles from './index.module.css';
function HomepageHeader() {
const {siteConfig} = useDocusaurusContext();
return (
<header className={clsx('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/intro">
Docusaurus Tutorial - 5min
</Link>
</div>
</div>
</header>
);
}
export default function Home() {
const {siteConfig} = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />">
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
</Layout>
);
}