Commit Graph

3 Commits

Author SHA1 Message Date
Robert Lützner f25e4d2ec8
Add missing p tag in aside shortcode definition (#18)
This fixes an issue where an `<aside>` element with a single line would
look really weird and boxed in, compared to an `<aside>` element with
multiple lines.

This has been bugging me for a while and I finally looked up how
Benjamin Hollon handles this on his blog. Here's a good example:

https://benjaminhollon.com/musings/wireless-is-a-lie/

. When compared with my own blog, I noticed the additional `<p>` tag in
Ben's code and everything became clear. If we have multiple lines, Hugo
will automatically introduce paragraphs and the formatting will be
correct. For a single line however, Hugo would assume that it was part
of the content surrounding it. That's why the surrounding box of an
`<aside>` element with a single line would look squashed.
2024-02-16 12:59:36 -06:00
Robert Lützner 8678494542
feat: add a shortcode for 'video' (#10)
This shortcode will add a video element embedded in a `<figure>` with an
optional `<figcaption>`.

This fixes #1.
2023-05-17 20:14:46 -05:00
Robert Lützner 80cd7cf8f1
feat: add 'aside' as a shortcode (#6)
The README has been updated to show a code example of both, including an
exemplary screenshot.

Since Hugo 0.55, we have to use `markdownify` in shortcodes that contain
HTML elements. At least we have to, if we want to render markdown code
inside the HTML element.

To use the `<aside>` element, we have to wrap our content in an
`<article>` tag.

This fixes #4.

Co-authored-by: Robert Lützner <robert.luetzner@iternity.com>
2023-02-23 14:04:33 -06:00