重新组织项目文件目录结构,在仓库中可以直接查看文档中的图片
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
"name": "dev-vitepress",
|
"name": "dev-vitepress",
|
||||||
"image": "node:20-alpine",
|
"image": "node:20-alpine",
|
||||||
|
|
||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"settings": {},
|
"settings": {},
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"vue.volar",
|
"vue.volar",
|
||||||
"vue.vscode-typescript-vue-plugin",
|
"vue.vscode-typescript-vue-plugin",
|
||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
"esbenp.prettier-vscode"
|
"esbenp.prettier-vscode"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"portsAttributes": {
|
"portsAttributes": {
|
||||||
"5173": {
|
"5173": {
|
||||||
"label": "vitepress debug",
|
"label": "vitepress debug",
|
||||||
"onAutoForward": "notify"
|
"onAutoForward": "notify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "apk add git && npm install && npm add -D vitepress",
|
"postCreateCommand": "apk add git && npm install && npm add -D vitepress",
|
||||||
"postAttachCommand": "npm run docs:dev"
|
"postAttachCommand": "npm run dev"
|
||||||
}
|
}
|
||||||
@@ -1,53 +1,53 @@
|
|||||||
name: CI/CD Pipeline for mengning.com.cn
|
name: CI/CD Pipeline for mengning.com.cn
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: gitea/runner-images:ubuntu-latest
|
image: gitea/runner-images:ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: 拉取代码
|
- name: 拉取代码
|
||||||
uses: https://devstar.cn/actions/checkout@v4
|
uses: https://devstar.cn/actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: 安装依赖
|
- name: 安装依赖
|
||||||
working-directory:
|
working-directory:
|
||||||
run: |
|
run: |
|
||||||
npm install
|
npm install
|
||||||
npm add -D vitepress
|
npm add -D vitepress
|
||||||
|
|
||||||
- name: 构建项目
|
- name: 构建项目
|
||||||
working-directory:
|
working-directory:
|
||||||
run: |
|
run: |
|
||||||
chmod +x node_modules/.bin/vitepress
|
chmod +x node_modules/.bin/vitepress
|
||||||
npm run docs:build
|
npm run build
|
||||||
|
|
||||||
- name: 构建 Docker 镜像
|
- name: 构建 Docker 镜像
|
||||||
run: |
|
run: |
|
||||||
docker build -t devstar-docs:${{ gitea.sha }} .
|
docker build -t devstar-docs:${{ gitea.sha }} .
|
||||||
|
|
||||||
- name: 登录 Docker Registry 并推送镜像
|
- name: 登录 Docker Registry 并推送镜像
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.DOCKER_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} ${{ vars.DOCKER_REGISTRY_ADDRESS }} --password-stdin
|
echo "${{ secrets.DOCKER_REGISTRY_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_REGISTRY_USERNAME }} ${{ vars.DOCKER_REGISTRY_ADDRESS }} --password-stdin
|
||||||
docker tag devstar-docs:${{ gitea.sha }} ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:${{ gitea.sha }}
|
docker tag devstar-docs:${{ gitea.sha }} ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:${{ gitea.sha }}
|
||||||
docker tag devstar-docs:${{ gitea.sha }} ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest
|
docker tag devstar-docs:${{ gitea.sha }} ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest
|
||||||
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:${{ gitea.sha }}
|
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:${{ gitea.sha }}
|
||||||
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest
|
docker push ${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest
|
||||||
|
|
||||||
- name: 📝 Update mengning.com.cn
|
- name: 📝 Update mengning.com.cn
|
||||||
run: |
|
run: |
|
||||||
curl -LO https://mirrors.ustc.edu.cn/kubernetes/core%3A/stable%3A/v1.28/deb/amd64/kubectl_1.28.0-1.1_amd64.deb
|
curl -LO https://mirrors.ustc.edu.cn/kubernetes/core%3A/stable%3A/v1.28/deb/amd64/kubectl_1.28.0-1.1_amd64.deb
|
||||||
sudo dpkg -i kubectl_1.28.0-1.1_amd64.deb
|
sudo dpkg -i kubectl_1.28.0-1.1_amd64.deb
|
||||||
kubectl config set-cluster remote-cluster --server=${{ secrets.K8S_URL }} --insecure-skip-tls-verify=true
|
kubectl config set-cluster remote-cluster --server=${{ secrets.K8S_URL }} --insecure-skip-tls-verify=true
|
||||||
kubectl config set-credentials token-user --token=${{ secrets.K8S_TOKEN }}
|
kubectl config set-credentials token-user --token=${{ secrets.K8S_TOKEN }}
|
||||||
kubectl config set-context remote-context --cluster=remote-cluster --user=token-user
|
kubectl config set-context remote-context --cluster=remote-cluster --user=token-user
|
||||||
kubectl config use-context remote-context
|
kubectl config use-context remote-context
|
||||||
kubectl set image deployment/devstar-docs-app devstar-docs=${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest -n app
|
kubectl set image deployment/devstar-docs-app devstar-docs=${{ vars.DOCKER_REGISTRY_ADDRESS }}/devstar/devstar-studio-docs:latest -n app
|
||||||
32
.gitignore
vendored
@@ -1,17 +1,17 @@
|
|||||||
# VitePress
|
# VitePress
|
||||||
docs/.vitepress/dist/
|
.vitepress/dist/
|
||||||
docs/.vitepress/cache/
|
.vitepress/cache/
|
||||||
docs/.vitepress/.temp/
|
.vitepress/.temp/
|
||||||
|
|
||||||
# Node.js
|
# Node.js
|
||||||
node_modules/
|
node_modules/
|
||||||
npm-debug.log*
|
npm-debug.log*
|
||||||
yarn-debug.log*
|
yarn-debug.log*
|
||||||
yarn-error.log*
|
yarn-error.log*
|
||||||
|
|
||||||
# Environment
|
# Environment
|
||||||
.env
|
.env
|
||||||
.env.local
|
.env.local
|
||||||
.env.development.local
|
.env.development.local
|
||||||
.env.test.local
|
.env.test.local
|
||||||
.env.production.local
|
.env.production.local
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
import { defineConfig } from 'vitepress'
|
import { defineConfig } from 'vitepress'
|
||||||
import type { DefaultTheme } from 'vitepress'
|
import type { DefaultTheme } from 'vitepress'
|
||||||
import { set_sidebar } from "../utils/auto_sidebar.js";
|
|
||||||
|
|
||||||
// https://vitepress.dev/reference/site-config
|
// https://vitepress.dev/reference/site-config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@@ -18,18 +17,18 @@ export default defineConfig({
|
|||||||
src: '/mnsoftware.png',
|
src: '/mnsoftware.png',
|
||||||
},
|
},
|
||||||
nav: [
|
nav: [
|
||||||
// { text: '文档', link: '/document/index' },
|
// { text: '文档', link: '/src/document/index' },
|
||||||
//
|
//
|
||||||
{ text: 'DevStar', link: '/devstar' },
|
{ text: 'DevStar', link: '/src/devstar' },
|
||||||
{ text: '编译加速', link: '/compile' },
|
{ text: '编译加速', link: '/src/compile' },
|
||||||
{ text: '虚拟仿真', link: '/simulator' },
|
{ text: '虚拟仿真', link: '/src/simulator' },
|
||||||
{ text: 'Enterprise', link: '/enterprise' },
|
{ text: 'Enterprise', link: '/src/enterprise' },
|
||||||
],
|
],
|
||||||
sidebar: {
|
sidebar: {
|
||||||
'/devstar/': sidebarDevStar(), // 直接返回 SidebarItem[]
|
'/src/devstar/': sidebarDevStar(), // 直接返回 SidebarItem[]
|
||||||
'/compile/': sidebarCompiling(),
|
'/src/compile/': sidebarCompiling(),
|
||||||
'/simulator/': sidebarSimulator(),
|
'/src/simulator/': sidebarSimulator(),
|
||||||
'/enterprise/': sidebarEnterprise()
|
'/src/enterprise/': sidebarEnterprise()
|
||||||
},
|
},
|
||||||
socialLinks: [
|
socialLinks: [
|
||||||
{ icon: 'github', link: ' https://github.com/mengning/DevStar' }
|
{ icon: 'github', link: ' https://github.com/mengning/DevStar' }
|
||||||
@@ -70,11 +69,11 @@ function sidebarDevStar(): DefaultTheme.SidebarItem[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
text: 'DevStar Studio',
|
text: 'DevStar Studio',
|
||||||
link: '/devstar/index',
|
link: '/src/devstar/index',
|
||||||
collapsible: true, // 使整个组可折叠
|
collapsible: true, // 使整个组可折叠
|
||||||
collapsed: false, // 默认展开
|
collapsed: false, // 默认展开
|
||||||
items: [
|
items: [
|
||||||
{ text: 'AI+ DevOps', link: '/devstar/ai-devops' },
|
{ text: 'AI+ DevOps', link: '/src/devstar/ai-devops' },
|
||||||
]
|
]
|
||||||
} as any,
|
} as any,
|
||||||
{
|
{
|
||||||
@@ -84,8 +83,8 @@ function sidebarDevStar(): DefaultTheme.SidebarItem[] {
|
|||||||
items: [
|
items: [
|
||||||
{ text: '对比Gitea与其它Git托管工具', link: 'https://docs.gitea.com/zh-cn/installation/comparison' },
|
{ 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: 'https://docs.gitea.com/zh-cn/installation/database-prep' },
|
||||||
// { text: '数据库准备', link: '/document/installation/from-source' },
|
// { text: '数据库准备', link: '/src/document/installation/from-source' },
|
||||||
{ text: '使用shell脚本安装', link: '/devstar/installation/install-via-shell-script' },
|
{ text: '使用shell脚本安装', link: '/src/devstar/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-binary' },
|
||||||
{ text: '包管理器安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-package' },
|
{ text: '包管理器安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-package' },
|
||||||
{ text: '使用源代码安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-source' },
|
{ text: '使用源代码安装', link: 'https://docs.gitea.com/zh-cn/installation/install-from-source' },
|
||||||
@@ -239,19 +238,19 @@ function sidebarSimulator(): DefaultTheme.SidebarItem[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
text: '虚拟仿真技术',
|
text: '虚拟仿真技术',
|
||||||
link: '/simulator/index',
|
link: '/src/simulator/index',
|
||||||
items: [
|
items: [
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '虚拟ECU',
|
text: '虚拟ECU',
|
||||||
link: '/simulator/vECU',
|
link: '/src/simulator/vECU',
|
||||||
items: [
|
items: [
|
||||||
]
|
]
|
||||||
} as any,
|
} as any,
|
||||||
{
|
{
|
||||||
text: '整车系统级软硬件联合仿真',
|
text: '整车系统级软硬件联合仿真',
|
||||||
link: '/simulator/vehicle-simulator',
|
link: '/src/simulator/vehicle-simulator',
|
||||||
items: []
|
items: []
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -261,7 +260,7 @@ function sidebarCompiling(): DefaultTheme.SidebarItem[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
text: '编译加速',
|
text: '编译加速',
|
||||||
link: '/compile/index',
|
link: '/src/compile/index',
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
]
|
]
|
||||||
@@ -273,15 +272,15 @@ function sidebarCompiling(): DefaultTheme.SidebarItem[] {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: '为什么需要分布式编译?',
|
text: '为什么需要分布式编译?',
|
||||||
link: '/compile/why-distributed-compiling'
|
link: '/src/compile/why-distributed-compiling'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'CloudBuild',
|
text: 'CloudBuild',
|
||||||
link: '/compile/cloudbuild'
|
link: '/src/compile/cloudbuild'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'ShareBuild',
|
text: 'ShareBuild',
|
||||||
link: '/compile/sharebuild'
|
link: '/src/compile/sharebuild'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
} as any,
|
} as any,
|
||||||
@@ -292,15 +291,15 @@ function sidebarCompiling(): DefaultTheme.SidebarItem[] {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: 'AI Compiler简介',
|
text: 'AI Compiler简介',
|
||||||
link: '/compile/why-distributed-compiling'
|
link: '/src/compile/why-distributed-compiling'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'CloudBuild',
|
text: 'CloudBuild',
|
||||||
link: '/compile/cloudbuild'
|
link: '/src/compile/cloudbuild'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'ShareBuild',
|
text: 'ShareBuild',
|
||||||
link: '/compile/sharebuild'
|
link: '/src/compile/sharebuild'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
} as any,
|
} as any,
|
||||||
@@ -311,15 +310,15 @@ function sidebarCompiling(): DefaultTheme.SidebarItem[] {
|
|||||||
items: [
|
items: [
|
||||||
{
|
{
|
||||||
text: 'PGO/LTO简介',
|
text: 'PGO/LTO简介',
|
||||||
link: '/compile/why-distributed-compiling'
|
link: '/src/compile/why-distributed-compiling'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'CloudBuild',
|
text: 'CloudBuild',
|
||||||
link: '/compile/cloudbuild'
|
link: '/src/compile/cloudbuild'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'ShareBuild',
|
text: 'ShareBuild',
|
||||||
link: '/compile/sharebuild'
|
link: '/src/compile/sharebuild'
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -330,14 +329,14 @@ function sidebarEnterprise(): DefaultTheme.SidebarItem[] {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
text: 'DevStar Enterprise',
|
text: 'DevStar Enterprise',
|
||||||
link: '/enterprise/index',
|
link: '/src/enterprise/index',
|
||||||
items: [
|
items: [
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: '常见问题FAQ',
|
text: '常见问题FAQ',
|
||||||
link: '/enterprise/faq',
|
link: '/src/enterprise/faq',
|
||||||
items: []
|
items: []
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
42
Dockerfile
@@ -1,21 +1,21 @@
|
|||||||
# 第一阶段:node镜像打包
|
# 第一阶段:node镜像打包
|
||||||
FROM node:20-alpine AS frontend-builder
|
FROM node:20-alpine AS frontend-builder
|
||||||
WORKDIR /build-app
|
WORKDIR /build-app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm install
|
RUN npm install
|
||||||
RUN npm add -D vitepress
|
RUN npm add -D vitepress
|
||||||
RUN npm run docs:build
|
RUN npm run build
|
||||||
|
|
||||||
# 第二阶段:nginx打包
|
# 第二阶段:nginx打包
|
||||||
FROM nginx:1.25-alpine
|
FROM nginx:1.25-alpine
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
# 替换nginx配置
|
# 替换nginx配置
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
# 将第一阶段的静态文件复制到nginx中
|
# 将第一阶段的静态文件复制到nginx中
|
||||||
RUN rm -rf /usr/share/nginx/html
|
RUN rm -rf /usr/share/nginx/html
|
||||||
RUN mkdir /usr/share/nginx/html
|
RUN mkdir /usr/share/nginx/html
|
||||||
COPY --from=frontend-builder /build-app/docs/.vitepress/dist /usr/share/nginx/html
|
COPY --from=frontend-builder /build-app/.vitepress/dist /usr/share/nginx/html
|
||||||
|
|
||||||
# 运行
|
# 运行
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
62
README.md
@@ -1,31 +1,31 @@
|
|||||||
# 梦宁软件官网及DevStar文档
|
# 梦宁软件官网及DevStar文档
|
||||||
|
|
||||||
## 配置开发环境
|
## 配置开发环境
|
||||||
|
|
||||||
```md
|
```md
|
||||||
npm install
|
npm install
|
||||||
npm add -D vitepress
|
npm add -D vitepress
|
||||||
```
|
```
|
||||||
|
|
||||||
## 如何启动调试项目
|
## 如何启动调试项目
|
||||||
```md
|
```md
|
||||||
npm run docs:dev
|
npm run dev
|
||||||
```
|
```
|
||||||
## 如何打包项目
|
## 如何打包项目
|
||||||
```md
|
```md
|
||||||
npm run docs:build
|
npm run build
|
||||||
```
|
```
|
||||||
## 如何预览打包的项目
|
## 如何预览打包的项目
|
||||||
```md
|
```md
|
||||||
npm run docs:preview
|
npm run preview
|
||||||
```
|
```
|
||||||
## 如何添加或修改侧边栏
|
## 如何添加或修改侧边栏
|
||||||
在docs/.vitepress/config.mts中的sidebar进行修改,对于不同路径下的侧边栏,分别使用不同函数得到,text为侧边栏的描述内容,link为点击侧边栏后加载的内容的链接,如果有子目录,在items进行修改
|
在docs/.vitepress/config.mts中的sidebar进行修改,对于不同路径下的侧边栏,分别使用不同函数得到,text为侧边栏的描述内容,link为点击侧边栏后加载的内容的链接,如果有子目录,在items进行修改
|
||||||
|
|
||||||
link链接的内容既可以是网页链接,也可以是本地文档
|
link链接的内容既可以是网页链接,也可以是本地文档
|
||||||
## 如何自定义网站样式
|
## 如何自定义网站样式
|
||||||
在docs/.vitepress/theme/style.css中自定义网站样式
|
在docs/.vitepress/theme/style.css中自定义网站样式
|
||||||
|
|
||||||
## 如何添加或修改导航栏
|
## 如何添加或修改导航栏
|
||||||
在docs/.vitepress/config.mts中的nav进行修改
|
在docs/.vitepress/config.mts中的nav进行修改
|
||||||
|
|
||||||
|
|||||||
@@ -1,65 +0,0 @@
|
|||||||
import path from "node:path";
|
|
||||||
import fs from "node:fs";
|
|
||||||
|
|
||||||
const DIR_PATH = path.resolve("docs");
|
|
||||||
const WHITE_LIST = ["index.md", ".vitepress", "node_modules", ".idea", "assets", "public"];
|
|
||||||
|
|
||||||
const isDirectory = (path) => fs.lstatSync(path).isDirectory();
|
|
||||||
const intersections = (arr1, arr2) =>
|
|
||||||
Array.from(new Set(arr1.filter((item) => !new Set(arr2).has(item))));
|
|
||||||
|
|
||||||
// 新增:按文件系统原始顺序排序
|
|
||||||
const keepOriginalOrder = (files, dirPath) => {
|
|
||||||
return files
|
|
||||||
.map(file => ({
|
|
||||||
name: file,
|
|
||||||
time: fs.statSync(path.join(dirPath, file)).birthtimeMs // 获取创建时间戳
|
|
||||||
}))
|
|
||||||
.sort((a, b) => a.time - b.time) // 按创建时间排序
|
|
||||||
.map(item => item.name);
|
|
||||||
};
|
|
||||||
|
|
||||||
function getList(params, path1, pathname) {
|
|
||||||
const res = [];
|
|
||||||
|
|
||||||
// 修改点1:使用 keepOriginalOrder 保持原始顺序
|
|
||||||
const orderedParams = keepOriginalOrder(params, path1);
|
|
||||||
|
|
||||||
for (let file of orderedParams) { // 修改点2:改用 for...of 遍历
|
|
||||||
const dir = path.join(path1, file);
|
|
||||||
const isDir = isDirectory(dir);
|
|
||||||
|
|
||||||
if (isDir) {
|
|
||||||
const files = fs.readdirSync(dir);
|
|
||||||
res.push({
|
|
||||||
text: file,
|
|
||||||
collapsible: true,
|
|
||||||
items: getList(files, dir, `${pathname}/${file}`),
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
const suffix = path.extname(file);
|
|
||||||
if (suffix !== ".md") continue;
|
|
||||||
|
|
||||||
const name = path.basename(file, '.md');
|
|
||||||
res.push({
|
|
||||||
text: name,
|
|
||||||
link: `${pathname}/${name}`,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改点3:完全移除 sort() 调用
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const set_sidebar = (pathname) => {
|
|
||||||
try {
|
|
||||||
const dirPath = path.join(DIR_PATH, pathname);
|
|
||||||
const files = fs.readdirSync(dirPath);
|
|
||||||
const items = intersections(files, WHITE_LIST);
|
|
||||||
return getList(items, dirPath, pathname);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(`Error generating sidebar for ${pathname}:`, error);
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -30,7 +30,7 @@ hero:
|
|||||||
# details: 安装和使用体验良好的详细描述
|
# details: 安装和使用体验良好的详细描述
|
||||||
---
|
---
|
||||||
<script setup>
|
<script setup>
|
||||||
import Index from './index.vue' // 你的组件
|
import Index from './src/index.vue' // 你的组件
|
||||||
</script>
|
</script>
|
||||||
<Index/>
|
<Index/>
|
||||||
|
|
||||||
28
package.json
@@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"vitepress": "^1.6.4"
|
"vitepress": "^1.6.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"docs:dev": "vitepress dev docs",
|
"dev": "vitepress dev",
|
||||||
"docs:build": "vitepress build docs",
|
"build": "vitepress build",
|
||||||
"docs:preview": "vitepress preview docs"
|
"preview": "vitepress preview"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vitejs/plugin-vue": "^6.0.1",
|
"@vitejs/plugin-vue": "^6.0.1",
|
||||||
"prismjs": "^1.30.0"
|
"prismjs": "^1.30.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 91 KiB After Width: | Height: | Size: 91 KiB |
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 233 KiB After Width: | Height: | Size: 233 KiB |
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 1.8 MiB After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 556 KiB After Width: | Height: | Size: 556 KiB |
|
Before Width: | Height: | Size: 1.9 MiB After Width: | Height: | Size: 1.9 MiB |
|
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 2.0 MiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 164 KiB After Width: | Height: | Size: 164 KiB |
|
Before Width: | Height: | Size: 510 KiB After Width: | Height: | Size: 510 KiB |
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 941 KiB After Width: | Height: | Size: 941 KiB |
|
Before Width: | Height: | Size: 756 KiB After Width: | Height: | Size: 756 KiB |
|
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 1.4 MiB After Width: | Height: | Size: 1.4 MiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
@@ -47,6 +47,6 @@ DevStar Enterprise 与 Gitea 项目的版本号不同但相互对应:
|
|||||||
|
|
||||||
## 问题反馈
|
## 问题反馈
|
||||||
|
|
||||||
大多数问题已在 [FAQ](/enterprise/faq) 中解答,如需进一步帮助请联系:
|
大多数问题已在 [FAQ](/src/enterprise/faq) 中解答,如需进一步帮助请联系:
|
||||||
|
|
||||||
**邮箱**: [contact@mengning.com.cn](mailto:contact@mengning.com.cn)
|
**邮箱**: [contact@mengning.com.cn](mailto:contact@mengning.com.cn)
|
||||||
@@ -47,6 +47,6 @@ DevStar Enterprise 与 Gitea 项目的版本号不同但相互对应:
|
|||||||
|
|
||||||
## 问题反馈
|
## 问题反馈
|
||||||
|
|
||||||
大多数问题已在 [FAQ](/enterprise/faq) 中解答,如需进一步帮助请联系:
|
大多数问题已在 [FAQ](/src/enterprise/faq) 中解答,如需进一步帮助请联系:
|
||||||
|
|
||||||
**邮箱**: [contact@mengning.com.cn](mailto:contact@mengning.com.cn)
|
**邮箱**: [contact@mengning.com.cn](mailto:contact@mengning.com.cn)
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="ten_main">
|
<div class="ten_main">
|
||||||
<div class="ten_links">
|
<div class="ten_links">
|
||||||
<a
|
<a
|
||||||
href="/devstar/ai-devops"
|
href="/src/devstar/ai-devops"
|
||||||
class="ten_img"
|
class="ten_img"
|
||||||
@mouseenter="hoverItem = 'about'"
|
@mouseenter="hoverItem = 'about'"
|
||||||
@mouseleave="hoverItem = null"
|
@mouseleave="hoverItem = null"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
href="/compile"
|
href="/src/compile"
|
||||||
class="ten_img"
|
class="ten_img"
|
||||||
@mouseenter="hoverItem = 'culture'"
|
@mouseenter="hoverItem = 'culture'"
|
||||||
@mouseleave="hoverItem = null"
|
@mouseleave="hoverItem = null"
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
href="/simulator"
|
href="/src/simulator"
|
||||||
class="ten_img"
|
class="ten_img"
|
||||||
@mouseenter="hoverItem = 'office'"
|
@mouseenter="hoverItem = 'office'"
|
||||||
@mouseleave="hoverItem = null"
|
@mouseleave="hoverItem = null"
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
<p>
|
<p>
|
||||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">苏ICP备2024068144号-1</a>
|
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">苏ICP备2024068144号-1</a>
|
||||||
©
|
©
|
||||||
<a href="/copyright" rel="noopener noreferrer">Mengning Software</a>.
|
<a href="/src/copyright" rel="noopener noreferrer">Mengning Software</a>.
|
||||||
2025- All rights reserved.
|
2025- All rights reserved.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||