gitea-docusaurus/README.md
HesterG 04a97d20b1
All checks were successful
Build and Publish Docs site / build-docs (push) Successful in 8m52s
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

![Screen Shot 2023-06-27 at 11.56.59](/attachments/7f43976d-f9f1-42ff-85f5-0bc84e549441)

![Screen Shot 2023-06-27 at 10.58.11](/attachments/bde25da5-b0a6-4908-9c69-c6aed41f8f59)

![Screen Shot 2023-06-21 at 12.26.26](/attachments/84a9bf5a-229b-4031-9654-3bae6cb3301a)

![Screen Shot 2023-06-19 at 16.34.33](/attachments/653b2b59-bc8a-4e6c-82f2-eb9710f55d8d)

Search:

![Screen Shot 2023-06-21 at 14.49.15](/attachments/3a09bd89-36a8-4156-a2df-2d3176d3ddb1)

Reviewed-on: #32
Co-authored-by: HesterG <hestergong@gmail.com>
Co-committed-by: HesterG <hestergong@gmail.com>
2023-07-05 03:54:54 +00:00

52 lines
582 B
Markdown

# Gitea Docusaurus
## How to build
```shell
make clean
make prepare-docs
make build
```
## Development
```shell
make clean
make prepare-docs
make serve
```
## Test en version
```
npm run start
```
## Test zh-cn version
```
npm run start -- --locale zh-cn
```
## Translate presets for zh-cn version
```
npx docusaurus write-translations --locale zh-cn
```
## Test both zh-cn and en versions
```
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
```