Move docs to docusaurus site

This commit is contained in:
Takeshi Kimata
2024-05-12 13:59:35 +09:00
parent af7cdb790e
commit 2b3dec3c12
17 changed files with 120 additions and 245 deletions

View File

@@ -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": {

View File

@@ -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": {

View File

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

View File

@@ -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>

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}

View File

@@ -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>
);
}