Skip to main content

Posts tagged with #shortcode

Recent Posts (Page 1)



A responsive and very fast shortcode to add youtube videos to your Hugo website. Usage This shortcode replaces the internal youtube shortcode and adds an unobtrusive, privacy conscious and unbloated custom element for YouTube videos. It uses lite-youtube-embed. go-html-template 1{{< youtube id="dQw4w9WgXcQ" >}} 2{{< youtube "dQw4w9WgXcQ" >}} 3{{< youtube id="dQw4w9WgXcQ" title="Lower your eyelids to die with the sun - M83" >}} Parameters parameter default notes class w-100 classnames to add to the video container id ID of the YouTube video to embed params custom parameters to be added to influence the display and functionality of the player.

Photo by Joanna Kosinska via Unsplash

Hugo Shortcode: Taglist

I needed a Hugo shortcode to show a list of posts that belonged to a certain</a

tag, which is quite easy. Add the following to layouts/shortcodes/taglist.html or whatever name you like to use for the shortcode.