Share redoc JavaScript between API versions

This is similar to the changes made in  docker/docker.github.io#5607
(32958e7c60), but which appear
to didn't make their way into newer versions that were added.

The redoc JavaScript is a big file, and there's no need
to keep a separate copy for each version of the API.

This patch removes the copy per-version and moves the script
to a central location.

Size of the API directory:

before: 5.961.110 bytes (6 MB on disk)
after:     15.570 bytes (74 KB on disk)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2019-06-13 14:59:21 +02:00
parent 8bd9e68bb6
commit eac39d66cd
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
10 changed files with 10 additions and 315 deletions

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long

View File

@ -9,27 +9,10 @@ layout: null
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Reference for the API served by Docker Engine.">
<meta charset="utf-8"/>
<!--
ReDoc doesn't change outer page styles
-->
<style>
body {
margin: 0;
padding: 0;
}
api-logo {
background-image: linear-gradient(0deg, #15A4D7 0%, #1488C6 100%);
height: 100px;
text-align: left !important;
}
api-logo img {
width: 136px !important;
margin: 32px 0 0 50px;
}
</style>
<link rel="stylesheet" type="text/css" href="/css/api-reference.css">
</head>
<body>
<redoc spec-url="swagger.yaml" hide-hostname="true" suppress-warnings="true" lazy-rendering></redoc>
<script src="redoc.1.11.0.min.js"> </script>
<script src="/js/redoc.min.js"> </script>
</body>
</html>

File diff suppressed because one or more lines are too long