263 lines
13 KiB
TypeScript
263 lines
13 KiB
TypeScript
import { defineConfig } from 'vitepress'
|
||
import { set_sidebar } from "../utils/auto_sidebar.js";
|
||
|
||
// https://vitepress.dev/reference/site-config
|
||
export default defineConfig({
|
||
markdown: {
|
||
vue: {
|
||
compilerOptions: {
|
||
isCustomElement: () => true // 禁止解析 ${{ }}
|
||
}
|
||
}
|
||
} as any,
|
||
title: "devstar",
|
||
head: [['link', { rel: 'icon', href: '/devstar-logo.png' }]],
|
||
description: "A VitePress Site",
|
||
themeConfig: {
|
||
// https://vitepress.dev/reference/default-theme-config
|
||
outlineTitle: '目录',
|
||
outline: [2, 6],
|
||
logo: '/devstar-logo.png',
|
||
nav: [
|
||
{ text: '文档', link: '/document/index' },
|
||
{ text: 'API', link: 'https://docs.gitea.com/zh-cn/api/1.24/' },
|
||
{ text: 'Runner', link: 'https://docs.gitea.com/zh-cn/runner/0.2.11/' },
|
||
{ text: 'Enterprise', link: 'https://docs.gitea.com/enterprise/' },
|
||
// { text: 'Examples', link: '/markdown-examples' }
|
||
],
|
||
|
||
// sidebar: [
|
||
// {
|
||
// text: 'Examples',
|
||
// items: [
|
||
// { text: 'Markdown Examples', link: '/markdown-examples' },
|
||
// { text: 'Runtime API Examples', link: '/api-examples' }
|
||
// ]
|
||
// }
|
||
// ],
|
||
// sidebar: {
|
||
// "/document/decription": set_sidebar("/document/decription"),
|
||
// },
|
||
sidebar: [
|
||
{
|
||
text: 'devstar是什么',
|
||
link: '/document/index',
|
||
attrs: { class: 'bold-item' }
|
||
} as any,
|
||
{
|
||
text: '安装',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
// link: 'https://docs.gitea.com/zh-cn/category/installation',
|
||
items: [
|
||
{ text: '对比Gitea与其它Git托管工具', link: '/document/installation/comparison.md' },
|
||
{ text: '数据库准备', link: '/document/installation/database-preparation.md' },
|
||
{ text: '使用二进制文件安装', link: '/document/installation/from-binary.md' },
|
||
{ text: '包管理器安装', link: '/document/installation/from-package.md' },
|
||
{ text: '使用源代码安装', link: '/document/installation/from-source.md' },
|
||
{ text: '在Linux中以service方式运行', link: '/document/installation/run-as-service-in-ubuntu.md' },//
|
||
{ text: '注册为Windows服务', link: '/document/installation/windows-service.md' },
|
||
{ text: '使用Docker安装(rootless)', link: '/document/installation/with-docker-rootless.md' },
|
||
{ text: '使用Docker安装', link: '/document/installation/with-docker.md' },
|
||
{ text: '在Kubernetes中安装Gitea', link: '/document/installation/on-kubernetes.md' },
|
||
{ text: '在云服务器上安装Gitea', link: '/document/installation/on-cloud-provider.md' },
|
||
{ text: '从旧版Gitea升级', link: '/document/installation/upgrade-from-gitea.md' },
|
||
]
|
||
} as any,
|
||
{
|
||
text: '管理',
|
||
// link: 'https://docs.gitea.com/zh-cn/category/administration',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{ text: '命令行', link: '/document/administration/command-line.md' },
|
||
{ text: '认证', link: '/document/administration/authentication.md' },
|
||
{ text: '环境变量清单', link: '/document/administration/environment-variables.md' },
|
||
{ text: '备份与恢复', link: '/document/administration/backup-and-restore.md' },
|
||
{ text: 'Email设置', link: '/document/administration/email-setup.md' },
|
||
{ text: 'Git LFS设置', link: '/document/administration/git-lfs-support.md' },
|
||
{ text: 'HTTPS配置', link: '/document/administration/https-support.md' },
|
||
{ text: '设置Fail2ban', link: '/document/administration/fail2ban-setup.md' },
|
||
{ text: '反向代理', link: '/document/administration/reverse-proxies.md' },
|
||
{ text: '嵌入资源提取工具', link: '/document/administration/cmd-embedded.md' },
|
||
{ text: '配置说明', link: '/document/administration/config-cheat-sheet.md' },
|
||
{ text: '日志配置', link: '/document/administration/logging-config.md' },
|
||
{ text: '邮件模板', link: '/document/administration/mail-templates.md' },
|
||
{ text: '仓库索引器', link: '/document/administration/repo-indexer.md' },
|
||
{ text: 'GPG提交签名', link: '/document/administration/signing.md' },
|
||
{ text: '外部渲染器', link: '/document/administration/external-renderers.md' },
|
||
{ text: '搜索引擎索引', link: '/document/administration/search-engines-indexation.md' },
|
||
// { text: '自定义Gitea配置', link: '/document/administration/customizing-gitea.md' },
|
||
{ text: '自定义Gitea配置', link: 'https://docs.gitea.com/zh-cn/administration/customizing-gitea' },
|
||
{ text: '添加法律页面', link: '/document/administration/adding-legal-pages.md' }
|
||
]
|
||
} as any,
|
||
{
|
||
text: '使用',
|
||
// link: 'https://docs.gitea.com/zh-cn/category/usage',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{
|
||
text: 'Actions',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: false, // 默认展开
|
||
items: [
|
||
{ text: 'Overview', link: 'document/usage/actions/overview.md' },
|
||
{ text: '快速入门', link: 'document/usage/actions/quickstart.md' },
|
||
{ text: '与GitHub Actions的对比', link: 'document/usage/actions/comparison.md' },
|
||
{ text: 'Act Runner', link: 'document/usage/actions/act-runner.md' },
|
||
{ text: '变量', link: 'document/usage/actions/variables.md' },
|
||
{ text: 'Gitea Actions设计', link: 'document/usage/actions/design.md' },
|
||
{ text: '密钥管理', link: 'document/usage/actions/secrets.md' },
|
||
{ text: 'Gitea Actions常见问题解答', link: 'document/usage/actions/faq.md' },
|
||
{ text: 'Badge', link: 'document/usage/actions/badge.md' } // 注意:Badge未找到对应文件,暂用comparison.md
|
||
]
|
||
},
|
||
{
|
||
text: '软件包',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{ text: '软件包注册表', link: '/document/usage/packages/overview.md' },
|
||
{ text: 'Alpine 软件包注册表', link: '/document/usage/packages/alpine.md' },
|
||
{ text: 'Arch package registry', link: '/document/usage/packages/arch.md' },
|
||
{ text: 'Cargo 软件包注册表', link: '/document/usage/packages/cargo.md' },
|
||
{ text: 'Chef 软件包注册表', link: '/document/usage/packages/chef.md' },
|
||
{ text: 'Composer 软件包注册表', link: '/document/usage/packages/composer.md' },
|
||
{ text: 'Conan 软件包注册表', link: '/document/usage/packages/conan.md' },
|
||
{ text: 'Conda 软件包注册表', link: '/document/usage/packages/conda.md' },
|
||
{ text: '容器注册表', link: '/document/usage/packages/container.md' },
|
||
{ text: 'CRAN 软件包注册表', link: '/document/usage/packages/cran.md' },
|
||
{ text: 'Debian 软件包注册表', link: '/document/usage/packages/debian.md' },
|
||
{ text: '通用软件包注册表', link: '/document/usage/packages/generic.md' },
|
||
{ text: 'Go 软件包注册表', link: '/document/usage/packages/go.md' },
|
||
{ text: 'Helm Chart 注册表', link: '/document/usage/packages/helm.md' },
|
||
{ text: 'Maven 软件包注册表', link: '/document/usage/packages/maven.md' },
|
||
{ text: 'NPM Package Registry', link: '/document/usage/packages/npm.md' },
|
||
{ text: 'NuGet 软件包注册表', link: '/document/usage/packages/nuget.md' },
|
||
{ text: 'Pub 软件包注册表', link: '/document/usage/packages/pub.md' },
|
||
{ text: 'PyPI 软件包注册表', link: '/document/usage/packages/pypi.md' },
|
||
{ text: 'RPM 软件包注册表', link: '/document/usage/packages/rpm.md' },
|
||
{ text: 'RubyGems 软件包注册表', link: '/document/usage/packages/rubygems.md' },
|
||
{ text: '存储', link: '/document/usage/packages/storage.md' },
|
||
{ text: 'Swift 软件包注册表', link: '/document/usage/packages/swift.md' },
|
||
{ text: 'Vagrant 软件包注册表', link: '/document/usage/packages/vagrant.md' }
|
||
]
|
||
},
|
||
{ text: 'AGit', link: '/document/usage/agit.md' },
|
||
{ text: '个人资料 README', link: '/document/usage/profile-readme.md' },
|
||
{ text: 'Blame File View', link: '/document/usage/blame.md' },
|
||
{ text: '邮件接收', link: '/document/usage/incoming-email.md' },
|
||
{ text: '标签', link: '/document/usage/labels.md' },
|
||
{ text: '合并请求', link: '/document/usage/pull-request.md' },
|
||
{ text: '权限', link: '/document/usage/permissions.md' },
|
||
{ text: '模板仓库', link: '/document/usage/template-repositories.md' },
|
||
{ text: '从模板创建工单与合并请求', link: '/document/usage/issue-pull-request-templates.md' },
|
||
{ text: '自动链接引用', link: '/document/usage/linked-references.md' },
|
||
{ text: '合并消息模板', link: '/document/usage/merge-message-templates.md' },
|
||
{ text: '推送', link: '/document/usage/push.md' },
|
||
{ text: 'Blocking a user', link: '/document/usage/blocking-users.md' },
|
||
{ text: '克隆过滤器(部分克隆)', link: '/document/usage/clone-filter.md' },
|
||
{ text: 'Code Owners', link: '/document/usage/code-owners.md' },
|
||
{ text: 'Webhooks', link: '/document/usage/webhooks.md' },
|
||
{ text: 'Migration', link: '/document/usage/migration.md' },
|
||
{ text: '受保护的标签', link: '/document/usage/protected-tags.md' },
|
||
{ text: '仓库镜像', link: '/document/usage/repo-mirror.md' },
|
||
{ text: 'Markdown', link: '/document/usage/markdown.md' },
|
||
{ text: 'Multi-factor Authentication (MFA)', link: '/document/usage/multi-factor-authentication.md' }
|
||
]
|
||
} as any,
|
||
{
|
||
text: '开发',
|
||
// link: 'https://docs.gitea.com/zh-cn/category/development',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{
|
||
text: '玩转 Gitea',
|
||
link: '/document/development/hacking-on-gitea.md' // 匹配"API 使用指南"对应的文件名
|
||
},
|
||
{
|
||
text: 'API 使用指南',
|
||
link: '/document/development/api-usage.md' // 直接使用文件名
|
||
},
|
||
{
|
||
text: 'OAuth2 提供者',
|
||
link: '/document/development/oauth2-provider.md' // 推测文件名
|
||
},
|
||
{
|
||
text: '迁移接口',
|
||
link: '/document/development/migrations.md' // 推测文件名
|
||
},
|
||
{
|
||
text: '集成',
|
||
link: '/document/development/integrations.md' // 推测文件名
|
||
}
|
||
]
|
||
} as any,
|
||
{
|
||
text: '贡献',
|
||
// link: 'https://docs.gitea.com/zh-cn/category/contributing',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{
|
||
text: '后端开发指南',
|
||
link: '/document/contributing/guidelines-backend.md' // 匹配文件名:guidelines - backend.md
|
||
},
|
||
{
|
||
text: '前端开发指南',
|
||
link: '/document/contributing/guidelines-frontend.md' // 匹配文件名:guidelines - frontend.md
|
||
},
|
||
{
|
||
text: '重构指南',
|
||
link: '/document/contributing/guidelines-refactoring.md' // 匹配文件名:guidelines - refactoring.md
|
||
},
|
||
{
|
||
text: '本地化',
|
||
link: '/document/contributing/localization.md' // 文件名完全一致
|
||
}
|
||
]
|
||
} as any,
|
||
{
|
||
text: '帮助',
|
||
// link: 'https://docs.gitea.com/zh-cn/category/help',
|
||
collapsible: true, // 使整个组可折叠
|
||
collapsed: true, // 默认展开
|
||
items: [
|
||
{ text: '常见问题', link: 'document/help/faq.md' },
|
||
{ text: '支持选项', link: 'document/help/support.md' },
|
||
]
|
||
} as any,
|
||
],
|
||
|
||
socialLinks: [
|
||
{ icon: 'github', link: ' https://github.com/mengning/DevStar' }
|
||
],
|
||
footer: {
|
||
copyright: 'Copyright © 2025-present devstar contributors',
|
||
},
|
||
// 设置搜索框的样式
|
||
search: {
|
||
provider: "local",
|
||
options: {
|
||
translations: {
|
||
button: {
|
||
buttonText: "搜索文档",
|
||
buttonAriaLabel: "搜索文档",
|
||
},
|
||
modal: {
|
||
noResultsText: "无法找到相关结果",
|
||
resetButtonTitle: "清除查询条件",
|
||
footer: {
|
||
selectText: "选择",
|
||
navigateText: "切换",
|
||
},
|
||
},
|
||
},
|
||
},
|
||
},
|
||
}
|
||
})
|