Compare commits

...

3 Commits

Author SHA1 Message Date
clay 3aa09bc898 dengjie commit : 部分教程编写 2022-11-08 15:07:46 +08:00
clay fc47b3c756 Merge remote-tracking branch 'origin/master' 2022-11-08 13:26:42 +08:00
clay 416f1a5c5e dengjie commit : 部分教程编写 2022-11-08 00:21:56 +08:00
7 changed files with 153 additions and 66 deletions

View File

@ -1,40 +0,0 @@
kind: pipeline
type: docker
name: cloud-security-wiki
steps:
- name: build-package-vue
image: node:14.20
volumes:
- name: cache
path: /drone/src/node_modules
- name: build
path: /app/build
commands:
- npm -v
- mkdir -p ./node_modules
- export NODE_MODULES_PATH=`pwd`/node_modules
- npm config set registry https://registry.npm.taobao.org
- set NODE_OPTIONS=--openssl-legacy-provider
- npm install
- npm run docs:build
- ls
- echo $NODE_MODULES_PATH
- rm -rf /app/build/dist
- cp -r docs/.vuepress/dist /app/build/dist
- chmod 777 /app/build/dist
volumes:
- name: build
host:
path: /www/wwwroot/wiki
- name: cache
host:
path: /var/lib/npm/cache
#trigger:
# branch:
# - dev-java
# - dev-vue
# event:
# - push

View File

@ -1,10 +1,14 @@
module.exports = {
title: "Cloud Security",// 文档标题,左上角显示
title: "Cloud Security",// 设置文档标题,左上角显示
description: "Cloud Security",
plugins: ['@vuepress/back-to-top'],//此处是添加返回顶部的插件
markdown: {
lineNumbers: true // 代码块显示行号
},
themeConfig: {
// logo:'/logo.png',
//最后更新时间
// lastUpdated: 'Last Updated',
head: [
['link', {rel: 'icon', href: '/logo.png'}],
],
@ -22,34 +26,29 @@ module.exports = {
// },
{text: "博客", link: "https://blog.isww.cn/"}
],
/**
* 设置侧边栏最大深度
* 一般是以单个md文件中的 # ## ### #### 这几个标题文字为锚点自动生成导航
* **/
sidebarDepth: 4,
// sidebarDepth: 0, //0读取1级标题 1读取1级和2级标题 2读取1级、2级、3级标题
sidebarDepth: 2,
// 设置侧边栏内容
sidebar: [
{
title: '教程',
collapsable: false,
children: [
'/document/',
// {
// title: '侧边栏组合',
// // collapsable: true,
// children: [
// '/second/child/'
// ]
// }
]
},
{
title: '文档',
collapsable: false,
children: [
'/wiki/introduce/',
'/wiki/back-build/'
'/wiki/back-build/',
// {
// title: "侧边栏组合",
// collapsable: false,
// children: [
// "/second/child/"
// ]
// }
] // 根据自己的需求来订对应自己在docs下的文件夹名默认首页是README.md
},
{
title: '教程',
collapsable: false,
children: [
'/document/'
] // 根据自己的需求来订对应自己在docs下的文件夹名默认首页是README.md
},
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -10,5 +10,5 @@ features:
details: 享受 Vue + webpack 的开发体验,在 Markdown 中使用 Vue 组件,同时可以使用 Vue 来开发自定义主题。
- title: 高性能
details: VuePress 为每个页面预渲染生成静态的 HTML同时在页面被加载的时候将作为 SPA 运行。
footer: MIT Licensed | Copyright © 2018-present Evan You
footer: MIT Licensed | Copyright © 2022-present Clay
---

View File

@ -1,4 +1,125 @@
# 首先
# config.js配置教程
## 其次
固定侧边栏,不折叠显示: collapsable: false,
## 设置站点根路径
- 如果访问的时候是ip+端口,那么这里就是**/**如果访问的是ip+端口+工程名,那么这里就是 **/工程名/**
- 这是部署到github相关的配置
```
module.exports = {
base:'/',
}
```
## 设置编译后的输出目录
- **./ROOT**代表在工程的根目录下生成一个ROOT文件里面是编译好的文件可以拿ROOT直接部署。
```
module.exports = {
dest:'./ROOT',
}
```
## 本地调试的端口号默认是8080
```
module.exports = {
port:8086,
}
```
## 代码块显示行号
```
module.exports = {
markdown: {
lineNumbers: true // 代码块显示行号
}
}
```
## 页面路由地址对应写法
| 文件的相对路径 | 页面路由地址 |
| :------------ | :------------ |
| /README.md | / |
| /guide/README.md | /guide/ |
| /config.md | /config.html |
## 网页标签的图标
- 这里的 '/' 指向 docs/.vuepress/public 文件目录 ,即 docs/.vuepress/public/logo.png
```
themeConfig: {
head: [
['link', {rel: 'icon', href: '/logo.png'}],
],
}
```
## 导航栏Logo
```
themeConfig: {
logo:'/logo.png',
}
```
![](/navLogo.png)
## nav配置【右上角的导航条】
```
themeConfig: {
nav:
[
{text: "首页", link: "/"},
{text: "指南", link: "/wiki/introduce/"},
{text: "博客", link: "https://blog.isww.cn/"}
],
}
```
## 侧边栏配置
### 设置左侧导航显示的层级
- sidebarDepth: 2
- 一般是以单个md文件中的 # ## ### #### 这几个标题文字为锚点自动生成导航
- 0读取1级标题
- 1读取1级和2级标题
- 2读取1级、2级、3级标题
### 设置侧边栏内容
- 根据自己的需求来订对应自己在docs下的文件夹名默认首页是README.md 【/wiki/introduce/ 相当于 /wiki/introduce/README.md】效果如下图
- 【注】其中侧边栏除了config.js下的title外的导航栏目是根据该目录(例如:/wiki/introduce/)下的一级、二级、三级和四级标题所自动生成的导航栏目,所以**侧边栏只需要在config.js配置页面路由地址及title即可**
```
themeConfig: {
sidebar: [
{
title: '文档',
collapsable: false,
children: [
'/wiki/introduce/',
'/wiki/back-build/',
{
title: "侧边栏组合",
collapsable: false,
children: [
"/second/child/"
]
}
]
},
]
}
```
## 底部设置最后更新时间
```
themeConfig: {
//最后更新时间
lastUpdated: 'Last Updated',
}
```

View File

@ -0,0 +1,7 @@
# 1共和国
## 2
### 3
#### 4
##### 5