2024-04-08 08:43:53 +08:00
|
|
|
|
# 帮助中心建设指南
|
2023-03-14 16:11:30 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
## 页面目录——仓库目录示意图
|
2023-03-15 16:04:51 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
1.如下图左边为帮助中心侧边栏一级目录展示效果,右边为代码仓库文件夹目录:
|
|
|
|
|
![](https://gitlink.org.cn/api/attachments/412473)
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
2.如下图左边为帮助中心侧边栏点击一级目录“Test1”后展开效果,右边为点击代码仓库文件夹“test1”后md文件目录:
|
|
|
|
|
![](https://gitlink.org.cn/api/attachments/412474)
|
|
|
|
|
|
|
|
|
|
## 创建markdown文档
|
|
|
|
|
* 创建第一篇文档
|
|
|
|
|
在**docs/test1**目录下创建hello.md
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
# Hello
|
|
|
|
|
|
|
|
|
|
This is my **first document**!
|
|
|
|
|
```
|
|
|
|
|
在一级标题中:#与标题内容间需要入空格(# Hello)
|
|
|
|
|
|
|
|
|
|
* 配置侧边栏
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
---
|
|
|
|
|
sidebar_label: 'Hi!' <!--定义侧边栏标签名称-->
|
|
|
|
|
sidebar_position: 3 <!--定义侧边栏层级位置-->
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
# Hello
|
|
|
|
|
|
|
|
|
|
This is my **first document**!
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
|
* 链接
|
2023-03-15 16:04:51 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
支持使用 url 路径或相对文件路径的常规 Markdown 链接
|
|
|
|
|
```bash
|
|
|
|
|
git操作 [git](/git).
|
|
|
|
|
```
|
|
|
|
|
```
|
|
|
|
|
git操作 [git](./git.md).
|
|
|
|
|
```
|
2023-03-15 16:04:51 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
<br/>
|
2023-03-15 16:04:51 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
* 图片
|
2023-03-15 16:04:51 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
支持常规markdown图片,在**static/img/gitlink_logo.png**中添加一个图像.png并在Markdown中显示它:
|
|
|
|
|
```bash
|
|
|
|
|
![gitlink logo](/img/gitlink_logo.png)
|
2023-03-30 15:33:17 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
```
|
2023-03-14 16:11:30 +08:00
|
|
|
|
|
2023-07-05 16:43:45 +08:00
|
|
|
|
## 前端build成中文 (i18n中可编辑对应中文内容)
|
2024-04-09 15:17:18 +08:00
|
|
|
|
```
|
2023-07-05 16:43:45 +08:00
|
|
|
|
npm run build -- --locale zh-CN
|
2024-04-09 15:17:18 +08:00
|
|
|
|
```
|
|
|
|
|
## 启动
|
|
|
|
|
```
|
2024-04-10 08:57:31 +08:00
|
|
|
|
npm run dev
|
2024-04-09 15:17:18 +08:00
|
|
|
|
```
|
2023-03-30 15:33:17 +08:00
|
|
|
|
|
2023-03-14 15:36:27 +08:00
|
|
|
|
|