From 5b70866f7cd26e1eec449dd6d25677a11d753714 Mon Sep 17 00:00:00 2001 From: Eneko Alonso Date: Wed, 18 Nov 2020 19:18:39 -0800 Subject: [PATCH] Improve documentation for Standalone plain HTML installation (#6605) * Plain old HTML instructions * Add sites for Standalone HTML installation --- README.md | 2 ++ docs/usage/installation.md | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 7faf9214..44a7315d 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,8 @@ This repository publishes three different NPM modules: We strongly suggest that you use `swagger-ui` instead of `swagger-ui-dist` if you're building a single-page application, since `swagger-ui-dist` is significantly larger. +If you are looking for plain ol' HTML/JS/CSS, [download the latest release](https://github.com/swagger-api/swagger-ui/releases/latest) and copy the contents of the `/dist` folder to your server. + ## Compatibility The OpenAPI Specification has undergone 5 revisions since initial creation in 2010. Compatibility between Swagger UI and the OpenAPI Specification is as follows: diff --git a/docs/usage/installation.md b/docs/usage/installation.md index abb98000..2e97af2a 100644 --- a/docs/usage/installation.md +++ b/docs/usage/installation.md @@ -99,3 +99,13 @@ See [unpkg's main page](https://unpkg.com/) for more information on how to use u ### Static files without HTTP or HTML Once swagger-ui has successfully generated the `/dist` directory, you can copy this to your own file system and host from there. + +## Plain old HTML/CSS/JS (Standalone) + +The folder `/dist` includes all the HTML, CSS and JS files needed to run SwaggerUI on a static website or CMS, without requiring NPM. + +1. Download the [latest release](https://github.com/swagger-api/swagger-ui/releases/latest). +1. Copy the contents of the `/dist` folder to your server. +1. Open `index.html` in your HTML editor and replace "https://petstore.swagger.io/v2/swagger.json" with the URL for your OpenAPI 3.0 spec. + +