mirror of
https://github.com/Redocly/redoc.git
synced 2025-05-02 22:53:47 +03:00
Enhance Readme
This commit is contained in:
parent
c0f43a3d15
commit
2f3e8a0f1e
22
README.md
22
README.md
|
@ -7,8 +7,15 @@
|
||||||
|
|
||||||
Swagger-generated API Reference Documentation
|
Swagger-generated API Reference Documentation
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
[Live demo](http://rebilly.github.io/ReDoc/)
|
[Live demo](http://rebilly.github.io/ReDoc/)
|
||||||
|
|
||||||
|
|
||||||
|
## CDN
|
||||||
|
- latest release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js
|
||||||
|
- particular release, e.g. v0.16.1: https://rebilly.github.io/ReDoc/releases/v0.16.0/redoc.min.js
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
#### tl;dr
|
#### tl;dr
|
||||||
|
@ -33,12 +40,13 @@ Swagger-generated API Reference Documentation
|
||||||
<body>
|
<body>
|
||||||
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'>
|
<redoc spec-url='http://petstore.swagger.io/v2/swagger.json'>
|
||||||
</redoc>
|
</redoc>
|
||||||
<script src="bower_components/redoc/dist/redoc.min.js"> </script>
|
<script src="https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"> </script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
```
|
```
|
||||||
|
That's it!
|
||||||
|
|
||||||
#### 1. Install redoc
|
### 1. Install ReDoc (skip this step for CDN)
|
||||||
Install using [bower](bower.io):
|
Install using [bower](bower.io):
|
||||||
|
|
||||||
bower install redoc
|
bower install redoc
|
||||||
|
@ -48,11 +56,15 @@ or using [npm](https://docs.npmjs.com/getting-started/what-is-npm):
|
||||||
npm install redoc --save
|
npm install redoc --save
|
||||||
|
|
||||||
Alternatively, you can **reference redoc directly** from CDN:
|
Alternatively, you can **reference redoc directly** from CDN:
|
||||||
- latest release: https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js
|
|
||||||
- particular release, e.g. v0.14.0: https://rebilly.github.io/ReDoc/releases/v0.14.0/redoc.min.js
|
|
||||||
|
|
||||||
#### 2. Reference redoc script in HTML
|
#### 2. Reference redoc script in HTML
|
||||||
Then reference [`redoc.min.js`](https://raw.githubusercontent.com/Rebilly/ReDoc/releases/dist/redoc.min.js) in your HTML page:
|
For CDN:
|
||||||
|
```html
|
||||||
|
<script src="https://rebilly.github.io/ReDoc/releases/latest/redoc.min.js"> </script>
|
||||||
|
```
|
||||||
|
|
||||||
|
For bower:
|
||||||
```html
|
```html
|
||||||
<script src="bower_components/redoc/dist/redoc.min.js"> </script>
|
<script src="bower_components/redoc/dist/redoc.min.js"> </script>
|
||||||
```
|
```
|
||||||
|
|
BIN
demo/redoc-demo.png
Normal file
BIN
demo/redoc-demo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 198 KiB |
Loading…
Reference in New Issue
Block a user