diff --git a/assets/css/v2/style.css b/assets/css/v2/style.css
index d26547f..7f5abd7 100644
--- a/assets/css/v2/style.css
+++ b/assets/css/v2/style.css
@@ -688,15 +688,20 @@ nav {
}
.api {
- margin: 2rem 0 2rem 2rem;
- width: 100%;
+ margin: 0 0 1rem 1rem;
.row {
display: grid !important;
}
+ .breadcrumb-layout {
+ width: auto;
+ margin-top: 2rem;
+ }
+
.nginx-docs-api-container {
- grid-column: 1 / -1 !important;
+ grid-column: 1 / -1;
max-width: 100% !important;
+ margin-top: 2rem;
}
.content-layout {
diff --git a/exampleSite/content/test-product/redoc/_index.md b/exampleSite/content/test-product/redoc/_index.md
new file mode 100644
index 0000000..b930484
--- /dev/null
+++ b/exampleSite/content/test-product/redoc/_index.md
@@ -0,0 +1,6 @@
+---
+description: Redocly API usage
+title: Redocly
+weight: 300
+toc: true
+---
diff --git a/exampleSite/content/test-product/redoc/api-reference.md b/exampleSite/content/test-product/redoc/api-reference.md
new file mode 100644
index 0000000..6f24b96
--- /dev/null
+++ b/exampleSite/content/test-product/redoc/api-reference.md
@@ -0,0 +1,11 @@
+---
+description: How API's from redocly are rendered for an example book API
+title: API Reference
+weight: 200
+type: redoc
+tags:
+ - api
+doctypes:
+ - reference
+---
+{{< openapi spec="./api/example.json" >}}
diff --git a/exampleSite/static/api/example.json b/exampleSite/static/api/example.json
new file mode 100644
index 0000000..3a469e3
--- /dev/null
+++ b/exampleSite/static/api/example.json
@@ -0,0 +1,98 @@
+{
+ "openapi": "3.0.3",
+ "info": {
+ "title": "Simple Book API",
+ "version": "v1",
+ "description": "A simple API to manage books."
+ },
+ "paths": {
+ "/books": {
+ "get": {
+ "summary": "Get all books",
+ "responses": {
+ "200": {
+ "description": "List of books",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Book"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "summary": "Add a new book",
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Book"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Book added"
+ }
+ }
+ }
+ },
+ "/books/{id}": {
+ "get": {
+ "summary": "Get a book by ID",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Book found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Book"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Book not found"
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "Book": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "author": {
+ "type": "string"
+ }
+ },
+ "required": ["id", "title", "author"]
+ }
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/layouts/redoc/single.html b/layouts/redoc/single.html
new file mode 100644
index 0000000..665217c
--- /dev/null
+++ b/layouts/redoc/single.html
@@ -0,0 +1,100 @@
+{{ define "main" }}
+
+
+
+
+
+
+
+
+
+ {{ if not .IsHome }}
+ {{ if not (in .Params.display_breadcrumb "false" ) }}
+ {{ partial "breadcrumb" .}}
+ {{ end }}
+ {{ end }}
+
+
+
+
+{{ end }}