对样式进行了修改
This commit is contained in:
@@ -12,6 +12,10 @@ npm run docs:build
|
||||
```md
|
||||
npm run docs:preview
|
||||
```
|
||||
## 如何添加或修改目录
|
||||
在docs/.vitepress/config.mts中的sidebar进行修改,text为目录的描述内容,link为点击目录后加载的内容的链接,如果有子目录,在items进行修改
|
||||
## 如何添加或修改侧边栏
|
||||
在docs/.vitepress/config.mts中的sidebar进行修改,对于不同路径下的侧边栏,分别使用不同函数得到,text为侧边栏的描述内容,link为点击侧边栏后加载的内容的链接,如果有子目录,在items进行修改
|
||||
|
||||
link链接的内容既可以是网页链接,也可以是本地文档
|
||||
## 如何自定义网站样式
|
||||
在docs/.vitepress/theme/style.css中自定义网站样式
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import { defineConfig } from 'vitepress'
|
||||
import type { DefaultTheme } from 'vitepress'
|
||||
import { set_sidebar } from "../utils/auto_sidebar.js";
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
@@ -17,15 +18,59 @@ export default defineConfig({
|
||||
src: '/mnsoftware.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/' },
|
||||
],
|
||||
sidebar: [
|
||||
// { text: '文档', link: '/document/index' },
|
||||
{
|
||||
text: 'devstar是什么',
|
||||
text: '文档',
|
||||
items: [
|
||||
{
|
||||
text: 'Devstar介绍文档',
|
||||
link: '/document/index'
|
||||
},
|
||||
]
|
||||
},
|
||||
{ text: 'API', link: 'https://docs.gitea.com/zh-cn/api/1.24/' },
|
||||
{ text: 'Runner', link: 'runner/index' },
|
||||
{ text: 'Enterprise', link: '/enterprise/index' },
|
||||
],
|
||||
sidebar: {
|
||||
'/document/': sidebarDocument(), // 直接返回 SidebarItem[]
|
||||
'/enterprise/': sidebarEnterprise()
|
||||
},
|
||||
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: "切换",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
function sidebarDocument(): DefaultTheme.SidebarItem[] {
|
||||
return [
|
||||
{
|
||||
text: 'Devstar是什么',
|
||||
link: '/document/index',
|
||||
items: []
|
||||
} as any,
|
||||
{
|
||||
text: '安装',
|
||||
@@ -34,6 +79,8 @@ export default defineConfig({
|
||||
items: [
|
||||
{ text: '对比Gitea与其它Git托管工具', link: 'https://docs.gitea.com/zh-cn/installation/comparison' },
|
||||
{ text: '数据库准备', link: 'https://docs.gitea.com/zh-cn/installation/database-prep' },
|
||||
// { text: '数据库准备', link: '/document/installation/from-source' },
|
||||
{ text: '使用shell脚本安装', link: '/document/installation/install-via-shell-script' },
|
||||
{ text: '使用二进制文件安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-binary' },
|
||||
{ text: '包管理器安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-package' },
|
||||
{ text: '使用源代码安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-source' },
|
||||
@@ -179,33 +226,75 @@ export default defineConfig({
|
||||
{ text: '支持选项', link: 'https://docs.gitea.com/zh-cn/help/support' },
|
||||
]
|
||||
} as any,
|
||||
],
|
||||
]
|
||||
}
|
||||
|
||||
socialLinks: [
|
||||
{ icon: 'github', link: ' https://github.com/mengning/DevStar' }
|
||||
],
|
||||
footer: {
|
||||
copyright: 'Copyright © 2025-present devstar contributors',
|
||||
function sidebarEnterprise(): DefaultTheme.SidebarItem[] {
|
||||
return [
|
||||
{
|
||||
text: 'Gitea Enterprise 是什么',
|
||||
link: '/enterprise/index',
|
||||
items: [
|
||||
|
||||
]
|
||||
},
|
||||
// 设置搜索框的样式
|
||||
search: {
|
||||
provider: "local",
|
||||
options: {
|
||||
translations: {
|
||||
button: {
|
||||
buttonText: "搜索文档",
|
||||
buttonAriaLabel: "搜索文档",
|
||||
{
|
||||
text: '特征',
|
||||
collapsible: true, // 使整个组可折叠
|
||||
collapsed: true, // 默认展开
|
||||
items: [
|
||||
{
|
||||
text: '可继承分支保护',
|
||||
link: 'https://docs.gitea.com/enterprise/features/inheritable-branch-protection'
|
||||
},
|
||||
modal: {
|
||||
noResultsText: "无法找到相关结果",
|
||||
resetButtonTitle: "清除查询条件",
|
||||
footer: {
|
||||
selectText: "选择",
|
||||
navigateText: "切换",
|
||||
{
|
||||
text: '依赖关系扫描',
|
||||
link: 'https://docs.gitea.com/enterprise/features/dependency-scan'
|
||||
},
|
||||
{
|
||||
text: 'IP 允许列表',
|
||||
link: 'https://docs.gitea.com/enterprise/features/ip-allowlist'
|
||||
},
|
||||
{
|
||||
text: '企业主题',
|
||||
link: 'https://docs.gitea.com/enterprise/features/enterprise-theme'
|
||||
},
|
||||
{
|
||||
text: '强制2FA身份验证',
|
||||
link: 'https://docs.gitea.com/enterprise/features/mandatory-2fa'
|
||||
},
|
||||
{
|
||||
text: '审计日志',
|
||||
link: 'https://docs.gitea.com/enterprise/features/audit-log'
|
||||
},
|
||||
{
|
||||
text: 'SAML',
|
||||
link: 'https://docs.gitea.com/enterprise/features/saml-auth'
|
||||
},
|
||||
{
|
||||
text: '发布节奏和版本控制',
|
||||
link: 'https://docs.gitea.com/enterprise/features/release-cadence'
|
||||
}
|
||||
})
|
||||
]
|
||||
} as any,
|
||||
{
|
||||
text: '安装',
|
||||
link: 'https://docs.gitea.com/enterprise/installation',
|
||||
items: []
|
||||
},
|
||||
{
|
||||
text: '常见问题',
|
||||
link: 'https://docs.gitea.com/enterprise/faq',
|
||||
items: []
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
function sidebarRunner(): DefaultTheme.SidebarItem[] {
|
||||
return [
|
||||
{
|
||||
link: '/runner/index',
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
|
@@ -1,22 +0,0 @@
|
||||
<script setup>
|
||||
import { useData } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import Index from '../components/Index.vue' // 你的组件
|
||||
|
||||
const { Layout } = DefaultTheme
|
||||
const { frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Layout>
|
||||
<!-- 保留默认主题的所有插槽 -->
|
||||
<template #home-hero>
|
||||
<VPHomeHero /> <!-- 默认Hero区域 -->
|
||||
<Index /> <!-- 你的自定义组件 -->
|
||||
</template>
|
||||
|
||||
<template #home-features>
|
||||
<VPHomeFeatures /> <!-- 默认Features区域 -->
|
||||
</template>
|
||||
</Layout>
|
||||
</template>
|
@@ -1,3 +1,30 @@
|
||||
/* .vitepress/theme/style.css */
|
||||
:root {
|
||||
--vp-sidebar-indent: 16px;
|
||||
/* 基础缩进量 */
|
||||
}
|
||||
|
||||
/* 侧边栏 */
|
||||
.VPSidebar {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
.curtain {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
|
||||
/* 首页图片 */
|
||||
img.VPImage.image-src {
|
||||
max-width: 500px !important;
|
||||
height: 220px !important;
|
||||
width: 380px !important;
|
||||
}
|
||||
|
||||
.image-container {
|
||||
/* height: 350px !important; */
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
/* 强制覆盖主题默认的Logo尺寸 */
|
||||
.VPImage.logo {
|
||||
height: 150px !important;
|
||||
@@ -9,6 +36,7 @@
|
||||
margin-left: -40px !important;
|
||||
}
|
||||
|
||||
/* home页面title部分 */
|
||||
.VPNavBar .title {
|
||||
margin-right: 20px !important;
|
||||
}
|
||||
@@ -20,21 +48,99 @@
|
||||
/* 移除掉目录之间的分割线 */
|
||||
.group {
|
||||
border-top: 0 !important;
|
||||
|
||||
/* padding-bottom: 0 !important; */
|
||||
.items {
|
||||
font-size: 20px !important;
|
||||
}
|
||||
line-height: 24px !important;
|
||||
padding: 4px 0 !important;
|
||||
}
|
||||
|
||||
.group .items {
|
||||
font-size: 16px !important;
|
||||
color: #3c3c43 !important;
|
||||
font-weight: 700px !important;
|
||||
.VPSidebarItem .level-1 .text {
|
||||
color: #606770;
|
||||
/* color: #333333 !important; */
|
||||
font-weight: 700 !important;
|
||||
}
|
||||
|
||||
|
||||
/* .VPHero .image-container img {
|
||||
width: 1000px !important;
|
||||
height: 300px !important;
|
||||
} */
|
||||
|
||||
/* 一级菜单 */
|
||||
.VPSidebarItem.level-0 {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.VPSidebarItem.level-0.is-link {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* 展开时 */
|
||||
.VPSidebarItem.level-0.collapsible {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
/* 二级菜单 */
|
||||
.VPSidebarItem.level-1 {
|
||||
padding-left: var(--vp-sidebar-indent);
|
||||
}
|
||||
|
||||
/* 三级菜单 */
|
||||
.VPSidebarItem.level-2 {
|
||||
padding-left: calc(var(--vp-sidebar-indent) * 2);
|
||||
}
|
||||
|
||||
/* 箭头图标对齐修正 */
|
||||
.VPSidebarItem .indicator {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.VPSidebarItem.collapsed.level-0.collapsible.collapsed {
|
||||
padding-bottom: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
.item {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
/* 侧边栏悬停效果 - 匹配图片风格 */
|
||||
.item:hover {
|
||||
background-color: #f5f5f7;
|
||||
/* 浅灰内背景(与图中一致) */
|
||||
color: #3451b2 !important;
|
||||
/* 深蓝文字(#3451b2) */
|
||||
border-radius: 8px;
|
||||
/* 圆角增大(匹配图中圆角) */
|
||||
transition: all 0.3s ease;
|
||||
/* 增强阴影:横向偏移0,纵向偏移4px,模糊12px,扩散2px,透明度0.15 */
|
||||
box-shadow: 10px 4px 12px 2px rgba(0, 0, 0, 0.15);
|
||||
position: relative;
|
||||
/* 确保阴影覆盖周围元素 */
|
||||
z-index: 1;
|
||||
/* 提升层级避免阴影被遮挡 */
|
||||
}
|
||||
|
||||
h2.text:hover {
|
||||
/* 浅灰内背景(与图中一致) */
|
||||
color: #3451b2 !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* 实现黑暗模式适配 */
|
||||
|
||||
/* 深色模式适配 */
|
||||
.dark .VPSidebarItem.collapsed.level-0.collapsible.collapsed:hover {
|
||||
background-color: #2d2d36;
|
||||
/* 深灰内背景 */
|
||||
color: #5a7eff;
|
||||
/* 亮蓝文字 */
|
||||
box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.25);
|
||||
/* 深色阴影更强 */
|
||||
}
|
||||
|
||||
.dark .VPSidebar {
|
||||
background-color: #1b1b1f !important;
|
||||
}
|
||||
|
||||
.dark .curtain {
|
||||
background-color: #1b1b1f !important;
|
||||
}
|
@@ -1,49 +0,0 @@
|
||||
---
|
||||
outline: deep
|
||||
---
|
||||
|
||||
# Runtime API Examples
|
||||
|
||||
This page demonstrates usage of some of the runtime APIs provided by VitePress.
|
||||
|
||||
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
|
||||
|
||||
```md
|
||||
<script setup>
|
||||
import { useData } from 'vitepress'
|
||||
|
||||
const { theme, page, frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
## Results
|
||||
|
||||
### Theme Data
|
||||
<pre>{{ theme }}</pre>
|
||||
|
||||
### Page Data
|
||||
<pre>{{ page }}</pre>
|
||||
|
||||
### Page Frontmatter
|
||||
<pre>{{ frontmatter }}</pre>
|
||||
```
|
||||
|
||||
<script setup>
|
||||
import { useData } from 'vitepress'
|
||||
|
||||
const { site, theme, page, frontmatter } = useData()
|
||||
</script>
|
||||
|
||||
## Results
|
||||
|
||||
### Theme Data
|
||||
<pre>{{ theme }}</pre>
|
||||
|
||||
### Page Data
|
||||
<pre>{{ page }}</pre>
|
||||
|
||||
### Page Frontmatter
|
||||
<pre>{{ frontmatter }}</pre>
|
||||
|
||||
## More
|
||||
|
||||
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
|
@@ -58,6 +58,7 @@ export default {
|
||||
<style scoped>
|
||||
h2 {
|
||||
border-top: 0;
|
||||
margin: 0 0 0 16px;
|
||||
}
|
||||
.product-container {
|
||||
max-width: 1200px;
|
||||
|
@@ -3,7 +3,7 @@ outline: deep
|
||||
weight: 1
|
||||
---
|
||||
|
||||
# 关于devstar
|
||||
# 关于Devstar
|
||||
|
||||
DevStar Studio 是一个Gitea 发行版,在Git代码仓库托管的基础上提供了开发环境DevEnv执行引擎,与VS Code插件或自定义IDE深度融合,形成灵活适配基础软件工具的生态平台,从而为开发者用户提供智能(代码大模型AI+)、安全(完全云原生)、一站式开箱即用的CI/CD全生命周期研发平台。
|
||||
|
||||
|
39
docs/document/installation/install-via-shell-script.md
Normal file
39
docs/document/installation/install-via-shell-script.md
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
outline: deep
|
||||
weight: 2
|
||||
---
|
||||
|
||||
# 使用shell脚本安装
|
||||
|
||||
## 在Windows环境下
|
||||
请在cmd命令行下先运行如下命令:
|
||||
```md
|
||||
powershell wsl --install -d Ubuntu-20.04
|
||||
```
|
||||
如果以上命令无法自动完成安装WSL,可以手动执行如下消耗完成命令安装:
|
||||
```md
|
||||
dism.exe /Online /Enable-Feature /FeatureName:Microsoft-Windows-Subsystem-Linux /All /LimitAccess /All
|
||||
dism.exe /Online /Enable-Feature /FeatureName:VirtualMachinePlatform /All /LimitAccess
|
||||
```
|
||||
## 在Ubuntu-20.04环境下
|
||||
运行如下命令完成安装:
|
||||
```md
|
||||
wget -c https://devstar.cn/assets/install.sh && chmod +x install.sh && sudo ./install.sh
|
||||
devstar help
|
||||
------------------------------------------------------------------------
|
||||
DevStar usage help:
|
||||
help, -h, --help, Help information
|
||||
start Start DevStar Studio
|
||||
--port=<arg> Specify the port number (default port is 8080)
|
||||
--version=<arg> Specify the DevStar Studio Image Version (default verson is latest)
|
||||
stop Stop the running DevStar Studio
|
||||
logs View the logs of the devstar-studio container
|
||||
clean Clean up the running DevStar Studio, including deleting user data. Please use with caution.
|
||||
------------------------------------------------------------------------
|
||||
sudo devstar start
|
||||
...
|
||||
-------------------------------------------------------
|
||||
DevStar started in http://localhost:8080 successfully!
|
||||
-------------------------------------------------------
|
||||
```
|
||||
然后通过浏览器打开http://localhost:8080完成后配置安装,默认第一个注册用户为管理员账户。
|
52
docs/enterprise/index.md
Normal file
52
docs/enterprise/index.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
title: Gitea Enterprise 介绍
|
||||
sidebar: auto
|
||||
---
|
||||
|
||||
# Gitea Enterprise
|
||||
|
||||
## 什么是 Gitea Enterprise?
|
||||
|
||||
Gitea Enterprise 是基于开源 Gitea 项目开发的增强版,为企业级用户提供更可靠的体验。
|
||||
|
||||
## 与开源版的关系
|
||||
|
||||
- 基于开源 Gitea 项目开发,操作和配置方式几乎相同
|
||||
- 熟悉 Gitea 的用户可以快速上手 Gitea Enterprise
|
||||
- 企业版专为企业用例需求构建
|
||||
- **注意**:企业版功能需要付费激活
|
||||
|
||||
> 如果您对价格有疑问,可以申请30天免费试用,试用期结束后可选择继续使用(功能将恢复为开源版相同)
|
||||
|
||||
## 定价方案
|
||||
|
||||
您可以在客户门户自主购买 Gitea Enterprise 许可证:
|
||||
|
||||
- 价格基于用户数量,可按实际需求购买
|
||||
- 支持随时"调整"许可证规模(增减用户数或调整时长)
|
||||
- 示例:可将20人12个月许可调整为40人6个月或10人24个月
|
||||
- 调整不产生额外费用
|
||||
- 许可证到期前可选择续订延长有效期
|
||||
- 随时续订可享受促销优惠
|
||||
|
||||
## 版本规则
|
||||
|
||||
Gitea Enterprise 与 Gitea 项目的版本号不同但相互对应:
|
||||
|
||||
- 企业版版本格式:`v21.6.*`
|
||||
- `v21.6` 表示基于 Gitea 1.21.6 版本开发
|
||||
- `.*` 包含企业版特有的补丁或功能更新
|
||||
|
||||
### 版本切换指南
|
||||
|
||||
1. **切换条件**:所有数据和配置完全兼容
|
||||
2. **操作步骤**:只需替换可执行文件或 Docker 镜像
|
||||
3. **版本对应规则**:
|
||||
- 从 Gitea v1.21.6 → 需选择 Gitea Enterprise v21+
|
||||
- 从 Gitea Enterprise v23.1.0 → 需选择 Gitea v1.23+
|
||||
|
||||
## 问题反馈
|
||||
|
||||
大多数问题已在 [FAQ](/faq) 中解答,如需进一步帮助请联系:
|
||||
|
||||
**邮箱**: [support@example.com](mailto:support@example.com)
|
@@ -1,85 +0,0 @@
|
||||
# Markdown Extension Examples
|
||||
|
||||
This page demonstrates some of the built-in markdown extensions provided by VitePress.
|
||||
|
||||
## Syntax Highlighting
|
||||
|
||||
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
|
||||
|
||||
**Input**
|
||||
|
||||
````md
|
||||
```js{4}
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
msg: 'Highlighted!'
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
````
|
||||
|
||||
**Output**
|
||||
|
||||
```js{4}
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
msg: 'Highlighted!'
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Custom Containers
|
||||
|
||||
**Input**
|
||||
|
||||
```md
|
||||
::: info
|
||||
This is an info box.
|
||||
:::
|
||||
|
||||
::: tip
|
||||
This is a tip.
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This is a warning.
|
||||
:::
|
||||
|
||||
::: danger
|
||||
This is a dangerous warning.
|
||||
:::
|
||||
|
||||
::: details
|
||||
This is a details block.
|
||||
:::
|
||||
```
|
||||
|
||||
**Output**
|
||||
|
||||
::: info
|
||||
This is an info box.
|
||||
:::
|
||||
|
||||
::: tip
|
||||
This is a tip.
|
||||
:::
|
||||
|
||||
::: warning
|
||||
This is a warning.
|
||||
:::
|
||||
|
||||
::: danger
|
||||
This is a dangerous warning.
|
||||
:::
|
||||
|
||||
::: details
|
||||
This is a details block.
|
||||
:::
|
||||
|
||||
## More
|
||||
|
||||
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).
|
Reference in New Issue
Block a user