Move docs to docusaurus site
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"label": "Architecuture",
|
||||
"position": 2,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"description": "Architecuture"
|
||||
}
|
||||
"position": 3
|
||||
}
|
||||
|
||||
4
docs/docs/getstarted/_category_.json
Normal file
4
docs/docs/getstarted/_category_.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"label": "Get started",
|
||||
"position": 2
|
||||
}
|
||||
7
docs/docs/getstarted/docker.md
Normal file
7
docs/docs/getstarted/docker.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Running TestPlat as a Docker container
|
||||
|
||||
##
|
||||
55
docs/docs/getstarted/manual.md
Normal file
55
docs/docs/getstarted/manual.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Running TestPlat manually
|
||||
|
||||
:::info[Prerequisite]
|
||||
|
||||
Prerequisite: v20 or higher node must be installed.
|
||||
|
||||
:::
|
||||
|
||||
To use TestPlat, you need run frontend server and backend server (API server).
|
||||
|
||||
First, clone the repository.
|
||||
|
||||
```bash
|
||||
git clone git@github.com:kimatata/TestPlat.git
|
||||
```
|
||||
|
||||
## Run backend server
|
||||
|
||||
Moves to backend directory, then install dependencies.
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
npm ci
|
||||
```
|
||||
|
||||
Initialize the database with the following command.
|
||||
|
||||
```bash
|
||||
npm run migrate
|
||||
```
|
||||
|
||||
Start backend server.
|
||||
|
||||
```bash
|
||||
node index
|
||||
```
|
||||
|
||||
## Run frontend server
|
||||
|
||||
Moves to frontend directory, then install dependencies.
|
||||
|
||||
```bash
|
||||
cd frontend
|
||||
npm ci
|
||||
```
|
||||
|
||||
Start frontend server
|
||||
|
||||
```bash
|
||||
rpm run dev
|
||||
```
|
||||
10
docs/docs/getstarted/selfhost.md
Normal file
10
docs/docs/getstarted/selfhost.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Self hosting
|
||||
|
||||
TestPlat is designed for self-hosted use. There are two ways to self-host the application: “Manual” and “Docker”.
|
||||
|
||||
- Docker (Recommended)
|
||||
- Manual
|
||||
@@ -8,12 +8,12 @@ import {themes as prismThemes} from 'prism-react-renderer';
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'TestPlat Document',
|
||||
title: 'TestPlat',
|
||||
// tagline: 'Dinosaurs are cool',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://your-docusaurus-site.example.com',
|
||||
url: 'https://kimatata.github.io',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/TestPlat/',
|
||||
@@ -30,8 +30,8 @@ const config = {
|
||||
// useful metadata like html lang. For example, if your site is Chinese, you
|
||||
// may want to replace "en" with "zh-Hans".
|
||||
i18n: {
|
||||
defaultLocale: 'ja',
|
||||
locales: ['ja'],
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
@@ -59,57 +59,17 @@ const config = {
|
||||
// Replace with your project's social card
|
||||
image: 'img/docusaurus-social-card.jpg',
|
||||
navbar: {
|
||||
title: 'TestPlat Docs',
|
||||
// logo: {
|
||||
// alt: 'TestPlat Logo',
|
||||
// src: 'img/logo.svg',
|
||||
// },
|
||||
items: [
|
||||
// {
|
||||
// type: 'docSidebar',
|
||||
// sidebarId: 'tutorialSidebar',
|
||||
// position: 'left',
|
||||
// label: 'Tutorial',
|
||||
// },
|
||||
{to: '/docs', label: 'Docs', position: 'left'},
|
||||
// {to: '/blog', label: 'Blog', position: 'left'},
|
||||
{
|
||||
href: 'https://github.com/facebook/docusaurus',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
title: 'TestPlat',
|
||||
logo: {
|
||||
alt: 'TestPlat Logo',
|
||||
src: 'img/android-chrome-192x192.png',
|
||||
},
|
||||
items: [
|
||||
{to: '/docs', label: 'Docs', position: 'left'},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
// {
|
||||
// title: 'Docs',
|
||||
// items: [
|
||||
// {
|
||||
// label: 'Tutorial',
|
||||
// to: '/docs/intro',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// {
|
||||
// title: 'Community',
|
||||
// items: [
|
||||
// {
|
||||
// label: 'Stack Overflow',
|
||||
// href: 'https://stackoverflow.com/questions/tagged/docusaurus',
|
||||
// },
|
||||
// {
|
||||
// label: 'Discord',
|
||||
// href: 'https://discordapp.com/invite/docusaurus',
|
||||
// },
|
||||
// {
|
||||
// label: 'Twitter',
|
||||
// href: 'https://twitter.com/docusaurus',
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} TestPlat. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
|
||||
BIN
docs/static/img/android-chrome-192x192.png
vendored
Normal file
BIN
docs/static/img/android-chrome-192x192.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
docs/static/img/favicon.ico
vendored
BIN
docs/static/img/favicon.ico
vendored
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 15 KiB |
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"Index": {
|
||||
"get_started": "Get Started",
|
||||
"demo": "Demo",
|
||||
"oss_tcmt": "Open Source Test Case Management",
|
||||
"web_application": "Web Application",
|
||||
"integrate_and_manage": "Integrate and manage all your software testing.",
|
||||
@@ -17,25 +18,10 @@
|
||||
"case_home": "Dashboard",
|
||||
"case_run": "Test Runs"
|
||||
},
|
||||
"Guide": {
|
||||
"self_host": "Self Host",
|
||||
"docker": "Docker",
|
||||
"manual": "Manual",
|
||||
"self_host_app": "Self host the application",
|
||||
"run_as_docker": "Running TestPlat as a Docker container",
|
||||
"run_by_manually": "Running TestPlat manually",
|
||||
"move_to_back": "Moves to backend directory",
|
||||
"backend_install": "Install dependencies",
|
||||
"init_db": "Initialize Database",
|
||||
"backend_start": "Start backend server",
|
||||
"move_to_front": "Moves to frontend directory",
|
||||
"front_install": "Install dependencies",
|
||||
"front_start": "Start frontend server"
|
||||
},
|
||||
"Header": {
|
||||
"title": "Open Source Test Case Management Tool",
|
||||
"description": "Integrate and manage all your software testing",
|
||||
"guide": "Guide",
|
||||
"docs": "Docs",
|
||||
"projects": "Projects"
|
||||
},
|
||||
"Projects": {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"Index": {
|
||||
"get_started": "テスト管理を始める",
|
||||
"demo": "デモ",
|
||||
"oss_tcmt": "オープンソーステストケース管理",
|
||||
"web_application": "ウェブアプリケーション",
|
||||
"integrate_and_manage": "ソフトウェア開発にかかわるすべてのテストを統合管理",
|
||||
@@ -17,25 +18,10 @@
|
||||
"case_home": "ダッシュボード",
|
||||
"case_run": "テスト実行"
|
||||
},
|
||||
"Guide": {
|
||||
"self_host": "セルフホスト",
|
||||
"docker": "Docker",
|
||||
"manual": "マニュアル",
|
||||
"self_host_app": "アプリのセルフホスト",
|
||||
"run_as_docker": "Docker containerによる実行",
|
||||
"run_by_manually": "手動での実行",
|
||||
"move_to_back": "backendディレクトリに遷移",
|
||||
"backend_install": "依存関係をインストール",
|
||||
"init_db": "データベースの初期化",
|
||||
"backend_start": "バックエンドサーバーの起動",
|
||||
"move_to_front": "frontendディレクトリに遷移",
|
||||
"front_install": "依存関係をインストール",
|
||||
"front_start": "フロントエンドサーバーの起動"
|
||||
},
|
||||
"Header": {
|
||||
"title": "オープンソーステストケース管理ツール",
|
||||
"description": "ソフトウェア開発にかかわるすべてのテストを統合管理",
|
||||
"guide": "ガイド",
|
||||
"docs": "ドキュメント",
|
||||
"projects": "プロジェクト"
|
||||
},
|
||||
"Projects": {
|
||||
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
Chip,
|
||||
Link as NextUiLink,
|
||||
} from "@nextui-org/react";
|
||||
import { MoveUpRight } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Link } from "@/src/navigation";
|
||||
import LangSwitch from "./LangSwitch";
|
||||
import { ThemeSwitch } from "@/components/theme-switch";
|
||||
import { GithubIcon } from "@/components/icons";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Header(params: { locale: string }) {
|
||||
@@ -46,15 +46,6 @@ export default function Header(params: { locale: string }) {
|
||||
</Link>
|
||||
</Chip>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<Link
|
||||
className="data-[active=true]:text-primary data-[active=true]:font-medium"
|
||||
href="/guide/selfhost"
|
||||
locale={params.locale}
|
||||
>
|
||||
{t("guide")}
|
||||
</Link>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<Link
|
||||
className="data-[active=true]:text-primary data-[active=true]:font-medium"
|
||||
@@ -64,6 +55,17 @@ export default function Header(params: { locale: string }) {
|
||||
{t("projects")}
|
||||
</Link>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<NextUiLink
|
||||
isExternal
|
||||
href="https://kimatata.github.io/TestPlat/docs/selfhost"
|
||||
aria-label="docs"
|
||||
showAnchorIcon
|
||||
anchorIcon={<MoveUpRight size={12} className="ms-1" />}
|
||||
>
|
||||
{t("docs")}
|
||||
</NextUiLink>
|
||||
</NavbarItem>
|
||||
</NavbarContent>
|
||||
|
||||
<NavbarContent className="basis-1 pl-4" justify="end">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { title, subtitle } from "@/components/primitives";
|
||||
import { Button, Link as NextUiLink } from "@nextui-org/react";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import { Link } from "@/src/navigation";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
@@ -38,27 +37,32 @@ export default function MainTitle({ locale }: Props) {
|
||||
|
||||
<div className="mt-5">
|
||||
<Button color="primary" radius="full">
|
||||
<Link href={`/guide/selfhost`} locale={locale}>
|
||||
<NextUiLink
|
||||
isExternal
|
||||
href="https://kimatata.github.io/TestPlat/docs/selfhost"
|
||||
aria-label="docs"
|
||||
className="text-white"
|
||||
>
|
||||
{t("get_started")}
|
||||
</NextUiLink>
|
||||
</Button>
|
||||
|
||||
<Button color="primary" radius="full" className="ms-2">
|
||||
<Link href={`/projects/`} locale={locale}>
|
||||
{t("demo")}
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
color="primary"
|
||||
radius="full"
|
||||
variant="bordered"
|
||||
className="ms-3"
|
||||
>
|
||||
<Link href={`/projects/`} locale={locale}>
|
||||
GitHub
|
||||
</Link>
|
||||
<Button color="primary" radius="full" className="ms-2">
|
||||
<NextUiLink
|
||||
size="sm"
|
||||
isExternal
|
||||
href="https://github.com/kimatata/TestPlat"
|
||||
aria-label="Github"
|
||||
showAnchorIcon
|
||||
anchorIcon={<ExternalLink size={16} />}
|
||||
></NextUiLink>
|
||||
className="text-white"
|
||||
>
|
||||
GitHub
|
||||
</NextUiLink>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Link, NextUiLinkClasses } from "@/src/navigation";
|
||||
|
||||
export type Props = {
|
||||
locale: string;
|
||||
};
|
||||
|
||||
export default function Guidebar({ locale }: Props) {
|
||||
const t = useTranslations("Guide");
|
||||
const links = [
|
||||
{
|
||||
name: t("self_host"),
|
||||
href: "/guide/selfhost",
|
||||
indent: false,
|
||||
},
|
||||
{
|
||||
name: t("docker"),
|
||||
href: "/guide/selfhost/docker",
|
||||
indent: true,
|
||||
},
|
||||
{
|
||||
name: t("manual"),
|
||||
href: "/guide/selfhost/manual",
|
||||
indent: true,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="w-64 border-r-1 ps-6 pt-6 dark:border-neutral-700">
|
||||
{links.map((link) => (
|
||||
<div key={link.name} className={`py-1 ${link.indent ? "ps-4" : ""}`}>
|
||||
<Link href={link.href} locale={locale} className={NextUiLinkClasses}>
|
||||
{link.name}
|
||||
</Link>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import Guidebar from "./GuideBar";
|
||||
|
||||
export default function GuideLayout({
|
||||
children,
|
||||
params: { locale },
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { locale: string };
|
||||
}) {
|
||||
return (
|
||||
<div className="flex border-t-1 dark:border-neutral-700 min-h-[calc(100vh-64px)]">
|
||||
<Guidebar locale={locale} />
|
||||
<div className="flex w-full">
|
||||
<div className="flex-grow px-12">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
import { Snippet, Card, CardBody } from "@nextui-org/react";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("run_as_docker")}</h1>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
import { Snippet } from "@nextui-org/react";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
const manualProcedures = [
|
||||
{
|
||||
uid: "clone",
|
||||
detail: "",
|
||||
code: "git clone git@github.com:kimatata/TestPlat.git",
|
||||
},
|
||||
{
|
||||
uid: "move-to-backend",
|
||||
detail: t("move_to_back"),
|
||||
code: "cd backend",
|
||||
},
|
||||
{
|
||||
uid: "backend-install",
|
||||
detail: t("backend_install"),
|
||||
code: "npm install",
|
||||
},
|
||||
{ uid: "init-db", detail: t("init_db"), code: "npm run migrate" },
|
||||
{ uid: "backend_start", detail: t("front_start"), code: "node index" },
|
||||
{
|
||||
uid: "move-to-frontend",
|
||||
detail: t("move_to_front"),
|
||||
code: "cd frontend",
|
||||
},
|
||||
{
|
||||
uid: "front-install",
|
||||
detail: t("frontend_install"),
|
||||
code: "npm install",
|
||||
},
|
||||
{ uid: "front-start", detail: t("front_start"), code: "npm run start" },
|
||||
];
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("run_by_manually")}</h1>
|
||||
<div className="mt-3">
|
||||
{manualProcedures.map((procedure, index) => (
|
||||
<div key={procedure.uid} className={`${index !== 0 ? "mt-3" : ""}`}>
|
||||
<p>{procedure.detail}</p>
|
||||
<Snippet variant="solid" color="primary" style={{ width: "32rem" }}>
|
||||
{procedure.code}
|
||||
</Snippet>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("self_host")}</h1>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user