Skip to content

Commit

Permalink
Merge pull request #106 from linwumingshi/chore/upgrade-vitepress
Browse files Browse the repository at this point in the history
chore(deps): upgrade pnpm/action-setup to v4 and vitepress to v1.3.3
  • Loading branch information
shalousun authored Aug 19, 2024
2 parents e00fe79 + 7aa019a commit 8e1ebc8
Show file tree
Hide file tree
Showing 12 changed files with 343 additions and 306 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
- uses: pnpm/action-setup@v4 # Uncomment this if you're using pnpm
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Setup pnpm
uses: pnpm/action-setup@v3
uses: pnpm/action-setup@v4
with:
version: 9.4.0
- name: Setup Pages
Expand Down
2 changes: 1 addition & 1 deletion docs/en/guide/community/concept.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# concept
# Concept

## Is smart-doc suitable for design-first development?
Some old-school programmers or so-called architects with many years of experience feel that `smart-doc`, a code-based scanning tool, is of no use to the design-first development model.
Expand Down
4 changes: 4 additions & 0 deletions docs/en/guide/community/pull-request-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ To prevent conflicts caused by changes in the upstream repository, you should `s

## 3. Commit && Push to Remote Repository

::: warning Code Formatting
Please use `mvn spring-javaformat:apply` to format your code before committing.
:::

1. A `pull request` can only contain one `commit`. If there are multiple `commits`, use the [Rebase command to merge commits](community/rebase-option.md)
2. Each `commit` should add corresponding modification records in the `CHANGELOG`.
3. Use `git push` or `git push -f`(add `-f` if merging remote `commits`) to push `commit` to the remote repository.
Expand Down
4 changes: 2 additions & 2 deletions docs/en/guide/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Open source is released from this site and synchronized to other warehouses, so

As long as you master the above methods, you will not be able to find any open source software version.

Have you `GET` arrived? When `GET` arrives, go to https://github.com/TongchengOpenSource/smart-docand give us three consecutive clicks!
Have you `GET` arrived? When `GET` arrives, go to [smart-doc](https://github.com/TongchengOpenSource/smart-doc) and give the project a star!

## Why can't I extract the comments?
This is often a question asked by newbies. The principle of `smart-doc` is to use comments and generics in the source code to analyze and generate documentation.
Expand Down Expand Up @@ -113,7 +113,7 @@ As long as there are two reasons:
Just when you get the field type from `class` through reflection, you can't know that it is a generic type, and ultimately it cannot be analyzed correctly. If the source code is not loaded, there is usually a very obvious display. The field comments of the entity are all `No comments found.`;
- You use a less standardized generic definition, such as using multiple letters to define a generic, as shown below using BR as the generic definition.

```
``` java
public abstract class BaseResult<BR> implements Serializable {

/**
Expand Down
6 changes: 3 additions & 3 deletions docs/en/guide/faq/feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Regarding `Q&A`, please follow the process below:

* For content available in the `Wiki`, please take the time to read the documentation, and do not raise an `Issue`.
* Duplicate `Issues` will be deleted. Please first search your question in `Issues` to confirm it hasn't been raised before creating a new [`Issue`](https://github.com/TongchengOpenSource/smart-doc/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=).
* Duplicate `Issues` will be deleted. Please first search your question in `Issues` to confirm it hasn't been raised before creating a new [`Issue`](https://github.com/TongchengOpenSource/smart-doc/issues/new/choose).
* If you encounter an error and are certain it's a `Bug`, please report it as a `Bug or PR` following the `Issue` template.
* For consultations and discussions, please join the WeChat group for communication.

Expand All @@ -16,9 +16,9 @@ Some `bugs` have emerged. It's hard for the official team to replicate issues re
## Single Module Test Case
If the issue can be replicated in a single module, the steps for submitting a test case are as follows:
- `Fork` the [smart-doc-example-cn](https://github.com/smart-doc-group/smart-doc-example-cn) project into your personal repository;
- Modify the `forked` code to add a test case. Then, on the project's `GitHub`, there will be a `&#8203;``【oaicite:1】``&#8203;` option. Choose to submit a PR to us. The official team will also merge the test case to test the problem.
- Modify the `forked` code to add a test case. Then, on the project's `GitHub`, there will be a `【Sync fork】` option. Choose to submit a PR to us. The official team will also merge the test case to test the problem.

## Multi-Module Project Test Case Feedback
If the issue can only be replicated in a multi-module context, the steps for submitting a test case are as follows:
- `Fork` the [spring-boot-maven-multiple-module](https://gitee.com/smart-doc-team/spring-boot-maven-multiple-module) project into your personal repository;
- Modify the `forked` code to add a test case. Then, on the project's `Gitee`, there will be a `&#8203;``【oaicite:0】``&#8203;` option. Choose to submit a PR to us. The official team will also merge the test case to test the problem.
- Modify the `forked` code to add a test case. Then, on the project's `Gitee`, there will be a `【Pull Request】` option. Choose to submit a PR to us. The official team will also merge the test case to test the problem.
12 changes: 6 additions & 6 deletions docs/en/guide/plugins/maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Add and create a `smart-doc.json` configuration file in the project. The plug-in
This configuration content is actually the result of converting `ApiConfig` written by unit test into `json`, so for the description of configuration items, you can refer to the configuration of the original unit test.

**Minimum Hive:**
```
``` json
{
"outPath": "D://md2" //Specify the output path of the document
}
Expand All @@ -136,7 +136,7 @@ In the above `json` configuration example, only `"outPath"` is required. Other c
## Run the plug-in to generate documentation
### 5.1 Using maven command line

```
``` bash
mvn -Dfile.encoding=UTF-8 smart-doc:html
// Generate document output to Markdown
mvn -Dfile.encoding=UTF-8 smart-doc:markdown
Expand Down Expand Up @@ -173,14 +173,14 @@ mvn -Dfile.encoding=UTF-8 smart-doc:javadoc-markdown
mvn -Dfile.encoding=UTF-8 smart-doc:javadoc-adoc
```
If you want to view the `debug` log when building using the `mvn` command, the `debug` log can also help you analyze the source code loading status of the `smart-doc-maven` plug-in, you can add a `-X` parameter. For example:
```
``` bash
mvn -X -Dfile.encoding=UTF-8 smart-doc:html
```

**Note:** Especially under the `window` system, if you actually use the `mvn` command line to perform document generation, garbled characters may appear, so you need to specify `-Dfile.encoding=UTF-8` during execution.

View the encoding of `maven`
```
``` bash
# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: D:\ProgramFiles\maven\bin\..
Expand Down Expand Up @@ -208,7 +208,7 @@ The following will introduce how to debug the `smart-doc-maven-plugin` plug-in.
Because `smart-doc-maven-plugin` ultimately uses `smart-doc` to complete the source code analysis and document generation of the project,
Usually the actual debugged code is `smart-doc`. But this process is mainly checked through `smart-doc-maven-plugin`.

```
``` xml
<dependency>
<groupId>com.ly.smart-doc</groupId>
<artifactId>smart-doc</artifactId>
Expand All @@ -229,7 +229,7 @@ This way you can go directly to the breakpoint.

**Tips:** The above is the source code of `smart-doc` that is used as an entrance to debug through the plug-in. If you want to debug the source code execution process of the plug-in itself, add the plug-in dependencies to the project dependencies, as follows:

```
``` xml
<dependency>
<groupId>com.ly.smart-doc</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
Expand Down
8 changes: 6 additions & 2 deletions docs/zh/guide/community/pull-request-process.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pr贡献流程
# PR贡献流程
[开源指南](https://docs.github.com/zh/pull-requests)

## 1. 从上游仓库同步(sync fork)
Expand All @@ -17,7 +17,11 @@

## 3. 提交commit && 推送到远程仓库

1. 一个`pull request`中只能一个`commit`。如果有多个`commit`,使用[Rebase命令合并commit](rebase-option.md)
:::warning 代码格式化
提交commit之前请使用 `mvn spring-javaformat:apply`进行代码格式化
:::

1. 一个`pull request`中只能一个`commit`。如果有多个`commit`,使用 [Rebase命令合并commit](rebase-option.md)
2. 每个`commit`都要在`CHANGELOG`中添加对应的修改记录。
3. `git push` 或则 `git push -f`(合并了远程`commit`添加 `-f`)推送`commit`到远程仓库

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/guide/faq/feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
关于`Q&A`,请按下面的流程:

*`Wiki`中有的内容,请花时间看文档,不要提`Issue`
* 重复的`Issue`会被删除,请先在`Issues`中搜索你的问题,确认没有后再提[`Issue`](https://github.com/TongchengOpenSource/smart-doc/issues/new?assignees=&labels=bug&projects=&template=bug_report.md&title=)
* 重复的`Issue`会被删除,请先在`Issues`中搜索你的问题,确认没有后再提[`Issue`](https://github.com/TongchengOpenSource/smart-doc/issues/new/choose)
* 我碰到个错误,确定是`Bug`,请按`Issue`模版提`Bug or PR`
* 咨询和讨论请来微信群,在群里交流。

Expand Down
10 changes: 5 additions & 5 deletions docs/zh/guide/plugins/maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ mvn -Dfile.encoding=UTF-8 -DconfigFile="src/main/resources/smart-doc.json" sma
**注意:** 对于老用户完全可以通过`Fastjson`或者是`Gson`库将`ApiConfig`转化成`json`配置。
## 运行插件生成文档
### 5.1 使用maven命令行
```
``` bash
//生成html
mvn -Dfile.encoding=UTF-8 smart-doc:html
//生成markdown
Expand Down Expand Up @@ -179,14 +179,14 @@ mvn -Dfile.encoding=UTF-8 smart-doc:javadoc-markdown
mvn -Dfile.encoding=UTF-8 smart-doc:javadoc-adoc
```
在使用`mvn`命令构建时如果想查看`debug`日志,`debug`日志也能够帮助你去分析`smart-doc-maven`插件的源码加载情况,可以加一个`-X`参数。例如:
```
``` shell
mvn -X -Dfile.encoding=UTF-8 smart-doc:html
```

**注意:** 尤其在`window`系统下,如果实际使用`mvn`命令行执行文档生成,可能会出现乱码,因此需要在执行时指定`-Dfile.encoding=UTF-8`

查看`maven`的编码
```
``` bash
# mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: D:\ProgramFiles\maven\bin\..
Expand Down Expand Up @@ -216,7 +216,7 @@ OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
因为`smart-doc-maven-plugin`最终是使用`smart-doc`来完成项目的源码分析和文档生成的,
通常情况下真正的调试的代码是`smart-doc`。但这个过程主要通过`smart-doc-maven-plugin`来排查。

```
``` xml
<dependency>
<groupId>com.ly.smart-doc</groupId>
<artifactId>smart-doc</artifactId>
Expand All @@ -237,7 +237,7 @@ OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

**提示:** 上面是通过插件去作为入口调试`smart-doc`的源码,如果你想调试插件本身的源码执行过程,则将插件的依赖添加到项目依赖中,如下:

```
``` xml
<dependency>
<groupId>com.ly.smart-doc</groupId>
<artifactId>smart-doc-maven-plugin</artifactId>
Expand Down
3 changes: 0 additions & 3 deletions docs/zh/guide/what-is-smart-doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
> Torna是由smart-doc官方独家推动联合研发的企业级文档管理系统,因此smart-doc官方不会对接其它任何的外部文档管理系统,例如像showdoc、yapi 之类的对接请自定内部处理,也不要再给我们提其他文档系统对接的PR。我们核心是把smart-doc+Torna的这套方案打造好

## TODO
- `GRPC`

## Contact

愿意参与构建`smart-doc`或者是需要交流问题可以扫描微信二维码发送`smart-doc`备注信息后管理员拉进群,[常见问题答疑](faq/faq)
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "smart-doc document",
"name": "smart-doc-document",
"type": "module",
"version": "1.0.0",
"description": "smart-doc",
Expand All @@ -10,15 +10,15 @@
"docs:build": "vitepress build docs",
"docs:serve": "vitepress serve docs"
},
"keywords": [],
"keywords": ["smart-doc","api-document"],
"author": "smart-doc",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.14.9",
"@vitejs/plugin-vue": "^5.0.5",
"esbuild": "^0.23.0",
"sass": "^1.77.6",
"vitepress": "^1.2.3"
"@types/node": "^22.4.0",
"@vitejs/plugin-vue": "^5.1.2",
"esbuild": "^0.23.1",
"sass": "^1.77.8",
"vitepress": "^1.3.3"
},
"dependencies": {
"@lunariajs/core": "^0.1.1",
Expand Down
Loading

0 comments on commit 8e1ebc8

Please sign in to comment.