Introduce experimental OpenAPI shortcode
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bookCollapseSection: true
|
||||
---
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Cards
|
||||
|
||||
Content blocks with optional images and links. Often used with [Columns](/docs/content/shortcodes/columns) for grid layouts.
|
||||
Content blocks with optional images and links. Often used with [Columns](/docs/content/shortcodes/columns/) for grid layouts.
|
||||
|
||||
## Syntax
|
||||
|
||||
@@ -18,7 +18,7 @@ Markdown content
|
||||
Cards can display an image above the content.
|
||||
{{< /card >}}
|
||||
|
||||
- {{< card href="/docs/content/shortcodes/cards" >}}
|
||||
- {{< card href="/docs/content/shortcodes/experimental/cards/" >}}
|
||||
### With Link {anchor=false}
|
||||
When `href` is set, the entire card becomes clickable.
|
||||
{{< /card >}}
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
title: OpenAPI
|
||||
---
|
||||
|
||||
# OpenAPI
|
||||
|
||||
Renders an OpenAPI 3.x specification as a documentation page. Operations are grouped by their first tag.
|
||||
|
||||
## Syntax
|
||||
|
||||
```tpl
|
||||
{{%/* openapi src="spec.json" */%}}
|
||||
```
|
||||
|
||||
The spec file is loaded via `resources.Get`, so the path is relative to the site's `assets/` directory. JSON and YAML are both supported.
|
||||
|
||||
## Example
|
||||
|
||||
{{% openapi src="tictactoe.json" %}}
|
||||
Reference in New Issue
Block a user