mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-15 20:39:52 +08:00
文档: 新增 Docusaurus 官网与双语文档,README 切换为英文默认 (#39)
- 新建 docs-site/ Docusaurus 项目,支持 en + zh-Hans 双语 - 从 README 迁移内容为独立文档页面: - Getting Started(安装、快速开始) - Deployment(Docker、裸机、Nginx、配置参考) - Features(备份类型、存储后端、SAP HANA、多节点集群、通知) - Reference(API、CLI) - Development(开发、贡献) - 自定义 BackupX 主题色、logo、落地页组件 - 新增 .github/workflows/docs.yml,Actions 自动构建并发布到 GitHub Pages - README.md 切换为英文,中文版挪到 README.zh-CN.md,两者均精简为导航型 - 配置站点 URL:https://awuqing.github.io/BackupX/
This commit is contained in:
84
docs-site/src/components/HomepageFeatures/index.tsx
Normal file
84
docs-site/src/components/HomepageFeatures/index.tsx
Normal file
@@ -0,0 +1,84 @@
|
||||
import type {ReactNode} from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Heading from '@theme/Heading';
|
||||
import Translate from '@docusaurus/Translate';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
type FeatureItem = {
|
||||
title: ReactNode;
|
||||
description: ReactNode;
|
||||
};
|
||||
|
||||
const FEATURES: FeatureItem[] = [
|
||||
{
|
||||
title: <Translate id="feat.types.title">Many Backup Types</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.types.desc">
|
||||
Files & directories with multi-path sources, plus MySQL, PostgreSQL, SQLite, and SAP HANA — all in one place.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Translate id="feat.storage.title">70+ Storage Backends</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.storage.desc">
|
||||
Native Alibaba OSS, Tencent COS, Qiniu, S3, Google Drive, WebDAV, FTP — plus SFTP, Azure Blob, Dropbox, OneDrive and dozens more via rclone.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Translate id="feat.scheduling.title">Scheduling & Retention</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.scheduling.desc">
|
||||
Cron-based schedules with a visual editor and auto-retention (by days or count), plus empty-directory cleanup.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Translate id="feat.cluster.title">Multi-Node Cluster</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.cluster.desc">
|
||||
Master-Agent mode manages backups across multiple servers. Agents run tasks locally and upload straight to storage — no reverse connectivity required.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Translate id="feat.security.title">Secure by Default</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.security.desc">
|
||||
JWT auth, bcrypt passwords, AES-256-GCM encrypted config, optional backup encryption, and a full audit log.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: <Translate id="feat.deploy.title">Painless Deployment</Translate>,
|
||||
description: (
|
||||
<Translate id="feat.deploy.desc">
|
||||
Single static binary with embedded SQLite. Docker one-click or bare-metal via install.sh — zero external dependencies.
|
||||
</Translate>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
function Feature({title, description}: FeatureItem) {
|
||||
return (
|
||||
<div className={clsx('col col--4', styles.feature)}>
|
||||
<Heading as="h3">{title}</Heading>
|
||||
<p>{description}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default function HomepageFeatures(): ReactNode {
|
||||
return (
|
||||
<section className={styles.features}>
|
||||
<div className="container">
|
||||
<div className="row">
|
||||
{FEATURES.map((props, idx) => (
|
||||
<Feature key={idx} {...props} />
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
20
docs-site/src/components/HomepageFeatures/styles.module.css
Normal file
20
docs-site/src/components/HomepageFeatures/styles.module.css
Normal file
@@ -0,0 +1,20 @@
|
||||
.features {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 3rem 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.feature {
|
||||
padding: 1.2rem 1rem;
|
||||
}
|
||||
|
||||
.feature h3 {
|
||||
font-size: 1.15rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.feature p {
|
||||
color: var(--ifm-color-content-secondary);
|
||||
line-height: 1.65;
|
||||
}
|
||||
37
docs-site/src/css/custom.css
Normal file
37
docs-site/src/css/custom.css
Normal file
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* BackupX 官方文档站样式
|
||||
*/
|
||||
|
||||
:root {
|
||||
--ifm-color-primary: #165dff;
|
||||
--ifm-color-primary-dark: #0e4fe6;
|
||||
--ifm-color-primary-darker: #0e4bd9;
|
||||
--ifm-color-primary-darkest: #0b3eb3;
|
||||
--ifm-color-primary-light: #2f6cff;
|
||||
--ifm-color-primary-lighter: #3d75ff;
|
||||
--ifm-color-primary-lightest: #668eff;
|
||||
--ifm-code-font-size: 92%;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.08);
|
||||
--ifm-font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
|
||||
--ifm-heading-font-weight: 600;
|
||||
}
|
||||
|
||||
[data-theme='dark'] {
|
||||
--ifm-color-primary: #4080ff;
|
||||
--ifm-color-primary-dark: #3371f2;
|
||||
--ifm-color-primary-darker: #2c6ae6;
|
||||
--ifm-color-primary-darkest: #2359c7;
|
||||
--ifm-color-primary-light: #5a93ff;
|
||||
--ifm-color-primary-lighter: #74a5ff;
|
||||
--ifm-color-primary-lightest: #9dbfff;
|
||||
--docusaurus-highlighted-code-line-bg: rgba(255, 255, 255, 0.08);
|
||||
--ifm-background-color: #0f1115;
|
||||
}
|
||||
|
||||
.hero--primary {
|
||||
background: linear-gradient(135deg, #165dff 0%, #0b3eb3 100%);
|
||||
}
|
||||
|
||||
.navbar__title {
|
||||
font-weight: 700;
|
||||
}
|
||||
31
docs-site/src/pages/index.module.css
Normal file
31
docs-site/src/pages/index.module.css
Normal file
@@ -0,0 +1,31 @@
|
||||
.heroBanner {
|
||||
padding: 5rem 0 4rem;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 996px) {
|
||||
.heroBanner {
|
||||
padding: 3rem 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.secondaryBtn {
|
||||
color: #fff !important;
|
||||
border-color: #fff;
|
||||
}
|
||||
|
||||
.secondaryBtn:hover {
|
||||
background-color: rgba(255, 255, 255, 0.15);
|
||||
color: #fff;
|
||||
}
|
||||
53
docs-site/src/pages/index.tsx
Normal file
53
docs-site/src/pages/index.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import type {ReactNode} from 'react';
|
||||
import clsx from 'clsx';
|
||||
import Link from '@docusaurus/Link';
|
||||
import Translate, {translate} from '@docusaurus/Translate';
|
||||
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
||||
import Layout from '@theme/Layout';
|
||||
import Heading from '@theme/Heading';
|
||||
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
||||
|
||||
import styles from './index.module.css';
|
||||
|
||||
function HomepageHeader() {
|
||||
return (
|
||||
<header className={clsx('hero hero--primary', styles.heroBanner)}>
|
||||
<div className="container">
|
||||
<Heading as="h1" className="hero__title">
|
||||
BackupX
|
||||
</Heading>
|
||||
<p className="hero__subtitle">
|
||||
<Translate id="home.tagline">
|
||||
Self-hosted server backup management — one binary, one command, manage every backup
|
||||
</Translate>
|
||||
</p>
|
||||
<div className={styles.buttons}>
|
||||
<Link
|
||||
className="button button--secondary button--lg"
|
||||
to="/docs/getting-started/quick-start">
|
||||
<Translate id="home.getStarted">Get Started</Translate>
|
||||
</Link>
|
||||
<Link
|
||||
className={clsx('button button--outline button--secondary button--lg', styles.secondaryBtn)}
|
||||
to="https://github.com/Awuqing/BackupX">
|
||||
GitHub
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Home(): ReactNode {
|
||||
const {siteConfig} = useDocusaurusContext();
|
||||
return (
|
||||
<Layout
|
||||
title={translate({id: 'home.title', message: 'Self-hosted backup management'})}
|
||||
description={siteConfig.tagline}>
|
||||
<HomepageHeader />
|
||||
<main>
|
||||
<HomepageFeatures />
|
||||
</main>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user