Introduce experimental OpenAPI shortcode

This commit is contained in:
Alex Shpak
2026-05-22 14:06:48 +02:00
parent 118c5354bb
commit 1d38cd0183
8 changed files with 683 additions and 35 deletions
@@ -0,0 +1,3 @@
---
bookCollapseSection: true
---
@@ -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" %}}