Skip to content

Commit

Permalink
feat: 添加说明文档
Browse files Browse the repository at this point in the history
  • Loading branch information
fanyushun committed Jul 12, 2024
1 parent 4704d1f commit 2b88f52
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 3 deletions.
38 changes: 37 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
# fxss-leetcode 算法

leetcode 算法
leetcode 算法集用于记录 leetcode 算法和平常想到的一些算法题,可以在 test 目录使用 vitest 测试,并以 vitepress 文档进行展示。

安装项目:

```sh
npm i
```

测试算法:

```sh
npm run test
```

文档展示:

```sh
npm run docs:dev
```

由于每次需要创建的文档比较多,所以专门增加了命令行创建、删除文件:

创建文件:

```sh
npm run add
```

按照命令行输入选择,可以直接创建代码段文件、测试文件、文档文件。leetcode 代码段标题以数字序号开头的,会自动排序。

删除文件:

```sh
npm run rm
```

按照命令行输入选择,删除所有相关文件。
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default defineConfig({
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: '主页', link: '/' },
{ text: '项目简介', link: '/introduction/' },
{ text: 'leetcode', link: '/leetcode/' },
{ text: '其他', link: '/other/' },
{ text: '泛积木-低代码', link: 'https://www.fxss.work/' },
Expand Down
9 changes: 7 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ hero:
tagline: leetcode 算法
actions:
- theme: brand
text: 快速开始
text: 项目简介
link: /introduction/
- theme: alt
text: leetcode
link: /leetcode/
- theme: alt
text: 其他
link: /other/
---

39 changes: 39 additions & 0 deletions docs/introduction/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# leetcode 算法集

leetcode 算法集用于记录 leetcode 算法和平常想到的一些算法题,可以在 test 目录使用 vitest 测试,并以 vitepress 文档进行展示。

安装项目:

```sh
npm i
```

测试算法:

```sh
npm run test
```

文档展示:

```sh
npm run docs:dev
```

由于每次需要创建的文档比较多,所以专门增加了命令行创建、删除文件:

创建文件:

```sh
npm run add
```

按照命令行输入选择,可以直接创建代码段文件、测试文件、文档文件。leetcode 代码段标题以数字序号开头的,会自动排序。

删除文件:

```sh
npm run rm
```

按照命令行输入选择,删除所有相关文件。

0 comments on commit 2b88f52

Please sign in to comment.