Separate figure and code shortcodes

This commit is contained in:
Will Faught
2023-02-26 18:29:09 -08:00
parent 830c2ba2c6
commit c044080791
3 changed files with 72 additions and 36 deletions

View File

@@ -408,11 +408,7 @@ Parameters: None.
The `paige/code` shortcode provides a figure with code.
```
{{< paige/code
caption="My caption"
lang="html"
options="linenos=true"
>}}
{{< paige/code lang="html" options="linenos=true" >}}
<!doctype html>
<html lang="en">
<body>
@@ -427,16 +423,12 @@ Inner content: Required. String. The code.
Parameters:
<dl>
<dt><code>caption</code></dt>
<dd>Optional. String. Markdown. Descriptive text below the code.</dd>
<dt><code>lang</code></dt>
<dd>Optional. Position 0. String. Chroma language code. Defaults to <code>plaintext</code>. See the <a href="https://gohugo.io/content-management/syntax-highlighting/#list-of-chroma-highlighting-languages">codes</a>.</dd>
<dt><code>options</code></dt>
<dd>Optional. String. Hugo highlight options. See the <a href="https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode">options</a>.</dd>
</dl>
It has the other parameters of the `paige/figure` shortcode.
### Image
The `paige/image` shortcode provides a figure with an image.