hugo

Shortcode - An image with a caption

February 26, 2024  -   2 mins read time -   263 words -  garrardkitchen

shortcode, caption, html, hugo, image

I had an article I wanted to post but knew with the number of images I planned on including, it will look unsightly. The first idea I had to make it less so, was to indent the image to break up the page a little. The next idea I had was to include a caption under each image. Knowing that HTML has an element called figure, I decided to use this. ...

Hugo Shortcodes - my first try

April 6, 2020  -   1 mins read time -   118 words -  garrardkitchen

hugo, shortcodes, example

My first attempt Here’s my first effort at creating a shortcode. This shortcode is available here Information Basic {{< note Sample text >}} Sample text With italics {{< note italic=“true” Sample text >}} Sample text With header {{< note title=“With header”> Sample text >}} With header Sample text Warning Basic {{< note warning=“true”> Sample text >}} Sample text With italic {{< note warning=“true” italic=“true” Sample text >}} Sample text With header {{< note warning=“true” title=“With header” Sample text >}} ...