diff --git a/README.md b/README.md index f16f7e94..8cc07034 100644 --- a/README.md +++ b/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" >}} + + +
+Test
+ + +{{< /paige/code >}} +``` + ## Customization If `partials/paige/head-last.html` exists in the site, it is included at the end of the head tag. diff --git a/layouts/shortcodes/paige/code.html b/layouts/shortcodes/paige/code.html new file mode 100644 index 00000000..7ee32ce8 --- /dev/null +++ b/layouts/shortcodes/paige/code.html @@ -0,0 +1,6 @@ +