mirror of
https://github.com/Awuqing/BackupX.git
synced 2026-05-07 04:52:52 +08:00
- 新建 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/
130 lines
3.3 KiB
TypeScript
130 lines
3.3 KiB
TypeScript
import {themes as prismThemes} from 'prism-react-renderer';
|
|
import type {Config} from '@docusaurus/types';
|
|
import type * as Preset from '@docusaurus/preset-classic';
|
|
|
|
// BackupX 官方站点 — 托管在 GitHub Pages
|
|
// https://awuqing.github.io/BackupX/
|
|
const config: Config = {
|
|
title: 'BackupX',
|
|
tagline: 'Self-hosted server backup management — one binary, one command',
|
|
favicon: 'img/favicon.ico',
|
|
|
|
future: {
|
|
v4: true,
|
|
},
|
|
|
|
url: 'https://awuqing.github.io',
|
|
baseUrl: '/BackupX/',
|
|
|
|
organizationName: 'Awuqing',
|
|
projectName: 'BackupX',
|
|
deploymentBranch: 'gh-pages',
|
|
trailingSlash: false,
|
|
|
|
onBrokenLinks: 'warn',
|
|
markdown: {
|
|
hooks: {
|
|
onBrokenMarkdownLinks: 'warn',
|
|
},
|
|
},
|
|
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en', 'zh-Hans'],
|
|
localeConfigs: {
|
|
en: {label: 'English', direction: 'ltr', htmlLang: 'en-US'},
|
|
'zh-Hans': {label: '简体中文', direction: 'ltr', htmlLang: 'zh-CN'},
|
|
},
|
|
},
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
{
|
|
docs: {
|
|
sidebarPath: './sidebars.ts',
|
|
editUrl: 'https://github.com/Awuqing/BackupX/edit/main/docs-site/',
|
|
},
|
|
blog: false,
|
|
theme: {
|
|
customCss: './src/css/custom.css',
|
|
},
|
|
} satisfies Preset.Options,
|
|
],
|
|
],
|
|
|
|
themeConfig: {
|
|
image: 'img/social-card.png',
|
|
colorMode: {
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
navbar: {
|
|
title: 'BackupX',
|
|
logo: {
|
|
alt: 'BackupX Logo',
|
|
src: 'img/logo.svg',
|
|
},
|
|
items: [
|
|
{
|
|
type: 'docSidebar',
|
|
sidebarId: 'docs',
|
|
position: 'left',
|
|
label: 'Docs',
|
|
},
|
|
{
|
|
href: 'https://github.com/Awuqing/BackupX/releases',
|
|
label: 'Downloads',
|
|
position: 'left',
|
|
},
|
|
{
|
|
type: 'localeDropdown',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: 'https://github.com/Awuqing/BackupX',
|
|
label: 'GitHub',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Docs',
|
|
items: [
|
|
{label: 'Introduction', to: '/docs/intro'},
|
|
{label: 'Quick Start', to: '/docs/getting-started/quick-start'},
|
|
{label: 'Installation', to: '/docs/getting-started/installation'},
|
|
],
|
|
},
|
|
{
|
|
title: 'Features',
|
|
items: [
|
|
{label: 'SAP HANA', to: '/docs/features/sap-hana'},
|
|
{label: 'Multi-Node Cluster', to: '/docs/features/multi-node'},
|
|
{label: 'API Reference', to: '/docs/reference/api'},
|
|
],
|
|
},
|
|
{
|
|
title: 'More',
|
|
items: [
|
|
{label: 'GitHub', href: 'https://github.com/Awuqing/BackupX'},
|
|
{label: 'Releases', href: 'https://github.com/Awuqing/BackupX/releases'},
|
|
{label: 'Docker Hub', href: 'https://hub.docker.com/r/awuqing/backupx'},
|
|
{label: 'Issues', href: 'https://github.com/Awuqing/BackupX/issues'},
|
|
],
|
|
},
|
|
],
|
|
copyright: `Copyright © ${new Date().getFullYear()} BackupX · Apache License 2.0`,
|
|
},
|
|
prism: {
|
|
theme: prismThemes.github,
|
|
darkTheme: prismThemes.dracula,
|
|
additionalLanguages: ['bash', 'yaml', 'ini', 'json', 'go', 'sql', 'nginx'],
|
|
},
|
|
} satisfies Preset.ThemeConfig,
|
|
};
|
|
|
|
export default config;
|