Skip to content

Commit 0fe6c05

Browse files
committed
Redocly: Add support for content on redocly pages
1 parent a170c6e commit 0fe6c05

File tree

4 files changed

+17
-19
lines changed

4 files changed

+17
-19
lines changed

assets/css/v2/style.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -923,10 +923,7 @@ nav {
923923
}
924924

925925
/* Allow redocly to fill the entire container */
926-
&.content__redocly {
927-
min-width: 100%;
928-
margin: 0;
929-
926+
.content__redocly {
930927
#api-component {
931928
z-index: 0;
932929
position: relative;

exampleSite/content/test-product/redoc/api-reference.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ tags:
88
doctypes:
99
- reference
1010
---
11+
12+
## Introduction
13+
14+
Welcome to the API Reference documentation for the example book API. This documentation provides detailed information about the API endpoints, request/response formats, and other relevant details.
15+
16+
## API Specification
17+
1118
{{< openapi spec="./api/example.json" >}}

layouts/redoc/single.html

Lines changed: 0 additions & 11 deletions
This file was deleted.

layouts/shortcodes/openapi.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
<api-container>
2-
<redoc spec-url="{{ .Get "spec" | relURL }}" menu-toggle path-in-middle-panel required-props-first
3-
hide-hostname="true" show-extensions="x-f5-experimental" nativeScrollbars ></redoc>
4-
</api-container>
1+
<div class="content__redocly" data-grid="wide">
2+
<div id="api-component">
3+
<api-container>
4+
<redoc spec-url="{{ .Get "spec" | relURL }}" menu-toggle path-in-middle-panel required-props-first
5+
hide-hostname="true" show-extensions="x-f5-experimental" nativeScrollbars >
6+
</redoc>
7+
</api-container>
8+
</div>
9+
</div>

0 commit comments

Comments
 (0)