Skip to content

Commit

Permalink
doc: 添加如何编写文档的说明 (#88)
Browse files Browse the repository at this point in the history
Signed-off-by: longjin <[email protected]>
  • Loading branch information
fslongjin authored Nov 17, 2024
1 parent e093404 commit 9d21590
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
23 changes: 22 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,28 @@ export default defineUserConfig({
text: '开发者指南',
link: '/dev-guide/',
},
]
],
sidebar: {
'/': 'heading',
'/dev-guide/': [
{
text: '开发者指南',
children: [
'/dev-guide/README.md',
'/dev-guide/how-to-write-docs.md',
],
},
],
'/user-manual/': [
{
text: '用户指南',
children: [
'/user-manual/README.md',

]
}
]
}

}
),
Expand Down
12 changes: 11 additions & 1 deletion docs/dev-guide/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# 开发者指南

TODO
开发者指南将帮助你了解如何对DADK项目作出贡献。

## 目录

以下是DragonOS社区的开发者指南,其中包含了一些通用的指引:

[https://community.dragonos.org/contributors/](https://community.dragonos.org/contributors/)

以下是特定于DADK项目的开发者指南:

1. [如何编写文档?](./how-to-write-docs.md)
34 changes: 34 additions & 0 deletions docs/dev-guide/how-to-write-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 如何编写文档?

## 准备运行环境

在开始编写文档之前,您需要准备一个运行环境。请确保您已经安装了nodejs 和 npm。

- Nodejs: ≥ v20
- npm: ≥ 10

## 安装依赖

在项目的`docs/`目录下运行以下命令来安装依赖:

```
npm install
```

## 启动开发服务器

安装完依赖后,您可以启动开发服务器来实时预览文档的更改。运行以下命令:

```
npm run docs:dev
```

然后,您就能在浏览器中实时预览文档了。

## 编写文档

您可以在`docs/`目录下找到文档的源文件,并根据需要进行编辑和添加。

### 添加一个新的文档

您创建md之后,需要在`docs/.vitepress/config.js`中添加路由。

0 comments on commit 9d21590

Please sign in to comment.