Add paige/code.html shortcode
This commit is contained in:
19
README.md
19
README.md
@@ -472,6 +472,8 @@ title: Search
|
||||
|
||||
## Shortcodes
|
||||
|
||||
### Images
|
||||
|
||||
The `paige/figure` shortcode provides a figure with a centered image and an optional centered caption.
|
||||
The image and caption can optionally be displayed inline instead of centered.
|
||||
The image has optional alt, title, width, and height attributes,
|
||||
@@ -498,6 +500,23 @@ These are the rest of the named parameters:
|
||||
width=500 >}}
|
||||
```
|
||||
|
||||
### Code
|
||||
|
||||
The `paige/code` shortcode provides a figure with centered, highlighted code and an optional caption.
|
||||
|
||||
These are the names and positions of the parameters:
|
||||
|
||||
```
|
||||
{{< paige/code lang="go" caption="My caption" options="linenos=true" >}}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<p>Test</p>
|
||||
</body>
|
||||
</html>
|
||||
{{< /paige/code >}}
|
||||
```
|
||||
|
||||
## Customization
|
||||
|
||||
If `partials/paige/head-last.html` exists in the site, it is included at the end of the head tag.
|
||||
|
Reference in New Issue
Block a user