mirror of
https://gitea.com/gitea/docs.git
synced 2026-06-11 04:31:26 +00:00
Add api page (#32)
# Changes - Added [redocusaurus](https://github.com/rohit-gohri/redocusaurus) package to display swagger api with reference to [woodpecker](https://github.com/woodpecker-ci/woodpecker/tree/master/docs) - Change `sed` for swagger.json for proper version and baseurl. - Add a dropdown for different api versions. (screenshot below) - On API pages, only API version dropdown will show(hide locale dropdown, version dropdown for doc, and doc search) - Allow build CSR API pages for development so it saves building time. # Screenshots     Search:  Reviewed-on: https://gitea.com/gitea/gitea-docusaurus/pulls/32 Co-authored-by: HesterG <hestergong@gmail.com> Co-committed-by: HesterG <hestergong@gmail.com>
This commit is contained in:
11
README.md
11
README.md
@@ -4,6 +4,7 @@
|
||||
|
||||
```shell
|
||||
make clean
|
||||
make prepare-docs
|
||||
make build
|
||||
```
|
||||
|
||||
@@ -11,6 +12,7 @@ make build
|
||||
|
||||
```shell
|
||||
make clean
|
||||
make prepare-docs
|
||||
make serve
|
||||
```
|
||||
|
||||
@@ -38,3 +40,12 @@ npx docusaurus write-translations --locale zh-cn
|
||||
npm run build
|
||||
npm run serve
|
||||
```
|
||||
|
||||
## Use CSR Api
|
||||
|
||||
This is for development, api pages will be CSR so this saves building time
|
||||
|
||||
```
|
||||
npm run start-CSRApi
|
||||
npm run build-CSRApi
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user