{"@attributes":{"version":"2.0"},"channel":{"title":"Home on Hugo Codex","link":"https:\/\/hugocodex.org\/","description":"Recent content in Home on Hugo Codex","generator":"Hugo","language":"en","lastBuildDate":"Tue, 23 Dec 2025 00:00:00 +0000","item":[{"title":"Share the love","link":"https:\/\/hugocodex.org\/donate\/share\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/share\/","description":"<p>If you like this website, but you do not have any money to spare, please share the love by posting something about this website on social media. You can use the buttons above. They will share the homepage. Thank you, you are the best!<\/p>"},{"title":"Share the love","link":"https:\/\/hugocodex.org\/simple-donate\/share\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/share\/","description":"<p>If you like this website, but you do not have any money to spare, please share the love by posting something about this website on social media. You can use the buttons above. They will share the homepage. Thank you, you are the best!<\/p>"},{"title":"Buy me a coffee","link":"https:\/\/hugocodex.org\/donate\/coffee\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/coffee\/","description":"<p>A perfect coffee in the morning absolutely makes my day. Buy me a small one for a good start or a big one to keep going all day!<\/p>"},{"title":"Buy me a coffee","link":"https:\/\/hugocodex.org\/simple-donate\/coffee\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/coffee\/","description":"<p>A perfect coffee in the morning absolutely makes my day. Buy me a small one for a good start or a big one to keep going all day!<\/p>"},{"title":"Buy me a beer","link":"https:\/\/hugocodex.org\/donate\/beer\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/beer\/","description":"<p>I like beer a lot! IPA, Guinness, Stout, craft beers&hellip; and I love to try new ones. Buy me half-a-pint to get going or a pint to get a good buzz.<\/p>"},{"title":"Buy me a beer","link":"https:\/\/hugocodex.org\/simple-donate\/beer\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/beer\/","description":"<p>I like beer a lot! IPA, Guinness, Stout, craft beers&hellip; and I love to try new ones. Buy me half-a-pint to get going or a pint to get a good buzz.<\/p>"},{"title":"Buy me chocolates","link":"https:\/\/hugocodex.org\/donate\/chocolates\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/chocolates\/","description":"<p>Buy me a fancy box of chocolates&hellip; not for me, but for my wife. Giving her chocolates will most certainly buy me extra programming time in my Linux powered man cave.<\/p>"},{"title":"Buy me chocolates","link":"https:\/\/hugocodex.org\/simple-donate\/chocolates\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/chocolates\/","description":"<p>Buy me a fancy box of chocolates&hellip; not for me, but for my wife. Giving her chocolates will most certainly buy me extra programming time in my Linux powered man cave.<\/p>"},{"title":"Buy me Hugo stickers","link":"https:\/\/hugocodex.org\/donate\/stickers\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/stickers\/","description":"<p>If you buy this, I will sponsor BEP \n<a href=\"https:\/\/github.com\/sponsors\/bep\" target=\"_blank\" rel=\"noopener\">through Github<\/a>, which will get me some very cool Hugo stickers. That enables me to decorate my laptop, my walls, my doors, my bike and my kids! I feel that I need at least 3 months of sponsoring on the 9 dollar plan, but feel free to buy me 6 months or a full year. BEP deserves it and I will keep sponsoring as long as the money keeps coming in.<\/p>"},{"title":"Buy me Hugo stickers","link":"https:\/\/hugocodex.org\/simple-donate\/stickers\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/stickers\/","description":"<p>If you buy this, I will sponsor BEP \n<a href=\"https:\/\/github.com\/sponsors\/bep\" target=\"_blank\" rel=\"noopener\">through Github<\/a>, which will get me some very cool Hugo stickers. That enables me to decorate my laptop, my walls, my doors, my bike and my kids! I feel that I need at least 3 months of sponsoring on the 9 dollar plan, but feel free to buy me 6 months or a full year. BEP deserves it and I will keep sponsoring as long as the money keeps coming in.<\/p>"},{"title":"Sponsor a feature","link":"https:\/\/hugocodex.org\/donate\/feature\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/feature\/","description":"<p>You can sponsor a feature from the &lsquo;without plugins&rsquo; page\/library. I will not only give you an honourable mention on the site, but I will also let you suggest some additional functionalities of this feature.<\/p>"},{"title":"Sponsor a feature","link":"https:\/\/hugocodex.org\/simple-donate\/feature\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/simple-donate\/feature\/","description":"<p>You can sponsor a feature from the &lsquo;without plugins&rsquo; page\/library. I will not only give you an honourable mention on the site, but I will also let you suggest some additional functionalities of this feature.<\/p>"},{"title":"Sitepins: An awesome CMS for Hugo","link":"https:\/\/hugocodex.org\/blog\/awesome-cms-for-hugo\/","pubDate":"Tue, 23 Dec 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/awesome-cms-for-hugo\/","description":"<p>So you have a Hugo website but you have no CMS? \n<a href=\"https:\/\/sitepins.com\/\" target=\"_blank\" rel=\"noopener\">Check out Sitepins.<\/a> Take it from somebody who created \n<a href=\"https:\/\/cms.usecue.com\" target=\"_blank\" rel=\"noopener\">a CMS for Hugo<\/a> himself: it is good. A very smooth interface (using React). Easy on the eyes&hellip; full-featured&hellip; and best of all: check that \n<a href=\"https:\/\/sitepins.com\/pricing\" target=\"_blank\" rel=\"noopener\">pricing page<\/a>. No way I can (or want to) compete with that! I am sure that once this goes out of beta the price will go up, so make sure you grab yourself on of those amazing deals on this awesome product. (click the image below)<\/p>"},{"title":"Creating a URL Redirect","link":"https:\/\/hugocodex.org\/blog\/hugo-url-redirect\/","pubDate":"Fri, 14 Nov 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/hugo-url-redirect\/","description":"<p>Sometimes you have an page that moved to a new URL. To prevent loss of SEO link juice, you want the old URL to forward to the new one. Fortunately Hugo has built in support for this. Just put the old relative url in the front matter in the aliases key, like this:<\/p>\n<pre tabindex=\"0\"><code>---\ntitle: Some post\naliases\n- \/my-old-url\n- \/even-older-url\n---\n<\/code><\/pre><p>Hugo now creates pages based on the built-in \n<a href=\"https:\/\/github.com\/gohugoio\/hugo\/blob\/master\/tpl\/tplimpl\/embedded\/templates\/alias.html\" target=\"_blank\" rel=\"noopener\">alias.html template<\/a>. That looks like this:<\/p>"},{"title":"Slider carousel improved","link":"https:\/\/hugocodex.org\/blog\/carousel-slider-improved\/","pubDate":"Thu, 23 Oct 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/carousel-slider-improved\/","description":"<p>I was looking at \n<a href=\"https:\/\/flickity.metafizzy.co\/\" target=\"_blank\" rel=\"noopener\">Flickety<\/a> from Metafizzy, after I created a \n<a href=\"https:\/\/www.usecue.com\/blog\/isotope-in-just-60-lines\/\" target=\"_blank\" rel=\"noopener\">modern version of their Isotope component<\/a>. I noticed that Flickety supports grabbing and dragging slides on desktop. After some searching I found \n<a href=\"https:\/\/codepen.io\/thenutz\/pen\/VwYeYEE?editors=1010\" target=\"_blank\" rel=\"noopener\">this codepen<\/a>, which did the same. I added this functionality to my 3kb slider component&hellip; and voila&hellip; The sliders\/carousels now support dragging with the mouse as well. Check out this \n<a href=\"https:\/\/code.usecue.com\" target=\"_blank\" rel=\"noopener\">front-end code library<\/a>.<\/p>\n<p>I might have just saved you 25 dollar in licensing fees! Happy coding!<\/p>"},{"title":"Automatic carousel added","link":"https:\/\/hugocodex.org\/blog\/automatic-carousel-added\/","pubDate":"Thu, 11 Sep 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/automatic-carousel-added\/","description":"<p>My friend and colleague Guus came with a great idea: let Hugo parse the content and transform lists with only images to carousels. A vibe coding demo and some optimalisations later, we now have a great new feature for Hugo. You can \n<a href=\"https:\/\/hugocodex.org\/add-ons\/slider-carousel\/\" target=\"_blank\" rel=\"noopener\">check it out<\/a>. The old carousel is also still available if you need a more complex setup. Thanks Guus and happy coding everybody!<\/p>"},{"title":"Useful body classes","link":"https:\/\/hugocodex.org\/blog\/useful-body-classes\/","pubDate":"Wed, 09 Jul 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/useful-body-classes\/","description":"<p>Styling becomes much easier when the body of your HTML document has the right classes. The following classes are very useful. Note that this assumes you give your sections (folders in the root of the content) english plural names, like &lsquo;products&rsquo; or &lsquo;reviews&rsquo;. It assumes this structure:<\/p>\n<pre tabindex=\"0\"><code>content\/\n\u251c\u2500\u2500 products\/ &lt;-- section\n\u2502   \u251c\u2500\u2500 _index.md &lt;-- list page\n\u2502   \u251c\u2500\u2500 product-1.md &lt;-- single page\n\u2502   \u2514\u2500\u2500 product-2.md\n\u251c\u2500\u2500 _index.md &lt;-- homepage\n\u251c\u2500\u2500 about.md &lt;-- other page\n\u2514\u2500\u2500 contact.md\n<\/code><\/pre><p>The code below will add the class &lsquo;home&rsquo; to your body for the homepage.<\/p>"},{"title":"Search with Lunr.js","link":"https:\/\/hugocodex.org\/blog\/search-with-lunr-js\/","pubDate":"Wed, 02 Jul 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/search-with-lunr-js\/","description":"<p>We have added search with Lunr.js to this website. Lunr.js uses a local index which allows you to create a tailor made search function. It has all benefits of a ready to go system, but is still very configurable. Go ahead and \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/search\/\">give it a try<\/a>.<\/p>"},{"title":"Migration steps for Hugo v0.147.9","link":"https:\/\/hugocodex.org\/blog\/migration-steps-for-v-0-147-9\/","pubDate":"Tue, 01 Jul 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/migration-steps-for-v-0-147-9\/","description":"<p>To fully migrate to v0.147.9 you should follow the following steps (if you did not already do so):<\/p>\n<ul>\n<li>move everything from the <code>_default<\/code> directory to the root of the <code>layouts<\/code> folder<\/li>\n<li>remove the <code>_default<\/code> folder<\/li>\n<li>rename all <code>single.html<\/code> files to <code>page.html<\/code><\/li>\n<li>rename all <code>list.html<\/code> files to <code>section.html<\/code><\/li>\n<li>move everything from the <code>layouts\/page<\/code> folder to the root of the <code>layouts<\/code> folder<\/li>\n<li>remove the <code>page<\/code> folder<\/li>\n<li>rename the config.yaml (or toml\/json) file to hugo.yaml (or toml\/json)<\/li>\n<li>replace <code>:filename<\/code> to <code>:contentbasename<\/code><\/li>\n<\/ul>\n<p>If you had a <code>single.html<\/code> in your <code>layouts<\/code> directory and a single in your <code>layouts\/page<\/code> directory, you should follow \n<a href=\"https:\/\/discourse.gohugo.io\/t\/possible-bug-single-layout-for-pages-in-v0-147-9\/55179\/8\" target=\"_blank\" rel=\"noopener\">these instructions<\/a>.<\/p>"},{"title":"New template system in Hugo v0.146.0","link":"https:\/\/hugocodex.org\/blog\/new-template-system\/","pubDate":"Thu, 26 Jun 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/new-template-system\/","description":"<p>In Hugo \n<a href=\"https:\/\/github.com\/gohugoio\/hugo\/releases\/tag\/v0.146.0\" target=\"_blank\" rel=\"noopener\">v0.146.0<\/a>, we performed a full re-implementation of how Go templates are handled in Hugo. This includes structural changes to the layouts folder and a new, more powerful template lookup system.<\/p>\n<p>We have aimed to maintain as much backward compatibility as possible by mapping \u201cold to new,\u201d but some reported breakages have occurred. We\u2019re working on a full overhaul of the documentation on this topic \u2013 until then, this is a one-pager with the most important changes.<\/p>"},{"title":"Improvement of the Youtube shortcode","link":"https:\/\/hugocodex.org\/blog\/improving-the-youtube-shortcode\/","pubDate":"Fri, 20 Jun 2025 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/improving-the-youtube-shortcode\/","description":"<p>We have added an improvement to the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/youtube-shortcode\/\">Youtube shortcode<\/a>. It now downloads the Youtube image automatically and resizes and crops it to fit a 16:9 layout. This requires <code>assetDir: static<\/code> in your config. It is a GDPR friendly\/legal Youtube embed (no need for a cookie bar). The trick is that it is not an actual embed&hellip; but a link\/image with a clear Youtube marking on it. Outgoing links are not subject to GDPR rules.<\/p>"},{"title":"Improvement of the lightbox","link":"https:\/\/hugocodex.org\/blog\/improving-the-lightbox\/","pubDate":"Fri, 29 Nov 2024 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/improving-the-lightbox\/","description":"<p>We have added a smooth transition to the lightbox, as well as the option to navigate with the arrow keys and close the lightbox with the Escape key. \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/lightbox\/\">Check it out<\/a>!<\/p>"},{"title":"Breaking summary change","link":"https:\/\/hugocodex.org\/blog\/breaking-summary-change\/","pubDate":"Thu, 10 Oct 2024 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/breaking-summary-change\/","description":"<p>I found out that in \n<a href=\"https:\/\/github.com\/gohugoio\/hugo\/releases\/tag\/v0.134.0\" target=\"_blank\" rel=\"noopener\">release 0.134 of Hugo<\/a> a breaking change was made. An automaticly generated <code>{{ .Summary }}<\/code> no longer outputs plain content. This might make you think twice about updating Hugo to the latest version. This problem can only be solved by replacing <code>{{ .Summary }}<\/code> by <code>{{ .Summary | plainify }}<\/code> wherever you use automatic summaries, which is quite some work. Be warned!<\/p>"},{"title":"Hugobricks has gotten an update","link":"https:\/\/hugocodex.org\/blog\/hugobricks-updated\/","pubDate":"Thu, 26 Sep 2024 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/hugobricks-updated\/","description":"<p>Sometimes all you need is a good excuse&hellip; I just found one to update Hugobricks, the ultimate Hugo theme. Not sure it is? \n<a href=\"https:\/\/www.hugobricks.preview.usecue.com\/demo-paragliding\/\" target=\"_blank\" rel=\"noopener\">Check out this page<\/a>. Doesn&rsquo;t that look awesome? I think it does. Go make your own website, using Hugobricks. The theme is MIT licensed. Check out the \n<a href=\"https:\/\/github.com\/jhvanderschee\/hugobricks\" target=\"_blank\" rel=\"noopener\">Github Repository<\/a> for licensing details.<\/p>"},{"title":"Updated image render hook","link":"https:\/\/hugocodex.org\/blog\/updated-image-hook\/","pubDate":"Mon, 23 Sep 2024 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/updated-image-hook\/","description":"<p>I have updated the image render hook from my article \n\n  <a href=\"https:\/\/hugocodex.org\/blog\/resize-all-images\/\">Resize all images<\/a>. It now checks for SVG images and handles them correctly. Additionally, I use with to check for the existence of the image resource.<\/p>\n<pre tabindex=\"0\"><code>{{ with (resources.GetMatch .Destination) }}\n    {{ if ne .MediaType.SubType &#34;svg&#34; }}\n        &lt;img src=&#34;{{ (.Resize `900x jpg Smart q50`).RelPermalink | safeURL }}&#34; alt=&#34;{{ $.Text }}&#34; \/&gt;\n    {{ else }}\n        &lt;img src=&#34;{{ .RelPermalink | safeURL }}&#34; alt=&#34;{{ $.Text }}&#34; \/&gt;\n    {{ end }}\n{{ end }}\n<\/code><\/pre>"},{"title":"Using 'page' in shortcodes ( cache \/ issue ? ) - be aware off","link":"https:\/\/hugocodex.org\/blog\/using-page-in-shortcodes-cache-issue-be-aware-off\/","pubDate":"Wed, 08 Nov 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/using-page-in-shortcodes-cache-issue-be-aware-off\/","description":"<p>Since recent Hugo versions (we are now at v0.120) the ellegant &lsquo;page&rsquo; notation was introduced. We can now have an easy access to a &lsquo;global Page object&rsquo; !\nGreat.<\/p>\n<p>While we were happily using it like this in Hugo &lsquo;shortcode&rsquo; :<\/p>\n<pre tabindex=\"0\"><code>{{ page.File.BaseFileName }}\n<\/code><\/pre><p>We noticed some (apparently) weird behaviour when building the site and watching what Firefox browser was rendering. Weird.<\/p>\n<p>In the issue queue, at the Github repository we reported it  :<\/p>"},{"title":"Why you should upgrade to Hugo v0.120","link":"https:\/\/hugocodex.org\/blog\/why-you-should-upgrade-hugo-to-0-120\/","pubDate":"Thu, 02 Nov 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/why-you-should-upgrade-hugo-to-0-120\/","description":"<p>When you are building multilingual websites and you are using a CMS then you want to upgrade to the latest Hugo version. Let me tell you why. Underscore index pages in your content directory (list pages of sections) needed a front matter entry to make the URL follow the permalink structure. In one of the more recent Hugo versions this has been fixed. You can now define the permalink of the list page in the config file! The individual pages are called &lsquo;page&rsquo; and the list page is called &lsquo;section&rsquo;. It looks like this if you use yaml:<\/p>"},{"title":"Speaking at HugoConf 2023","link":"https:\/\/hugocodex.org\/blog\/speaking-at-hugoconf-2023\/","pubDate":"Sun, 01 Oct 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/speaking-at-hugoconf-2023\/","description":"<p>It has been an honor to speak at HugoConf 2023. My talk was about Hugobricks, a theme\/concept for stackable content blocks in Hugo. If you want to see my 7 minute (pre-recorded) talk, check it out on \n<a href=\"https:\/\/vimeo.com\/862118474\/865457fbbf\" target=\"_blank\" rel=\"noopener\">Vimeo<\/a> or \n<a href=\"https:\/\/www.youtube.com\/watch?v=BusNdoZNVRk\" target=\"_blank\" rel=\"noopener\">Youtube<\/a>.<\/p>\n<p>This was my third conference talk. I have also been presenting at \n<a href=\"https:\/\/www.usecue.com\/blog\/speaking-at-jekyllconf-2019\/\" target=\"_blank\" rel=\"noopener\">JekyllConf 2019<\/a> and \n<a href=\"https:\/\/hugocodex.org\/blog\/resize-all-images\/\" target=\"_blank\" rel=\"noopener\">HugoConf 2022<\/a>. I was accompanied by some great speakers, like Joe Mooring (famous in the Hugo community for his excellent support). He talked about contributing to open-source. \n<a href=\"https:\/\/www.youtube.com\/watch?v=PuRDrL0NcAg\" target=\"_blank\" rel=\"noopener\">His talk<\/a> was my personal favorite. I also really liked \n<a href=\"https:\/\/www.youtube.com\/watch?v=gBSOTAOA-LY\" target=\"_blank\" rel=\"noopener\">the talk of Christian Oliff<\/a> about render hooks, as well as \n<a href=\"https:\/\/www.youtube.com\/watch?v=WgoBoX4qTk8\" target=\"_blank\" rel=\"noopener\">the talk from Liam Bigelow<\/a> about Pagefind. If you want to be astonished by numbers and magnitude, I recommend \n<a href=\"https:\/\/www.youtube.com\/watch?v=9OiU3N2Ps9g\" target=\"_blank\" rel=\"noopener\">the talk of John Phamvan<\/a>, who spoke about a Hugo website with 4 million pages. Finally, for anyone who has ever migrated a website to Hugo: you must \n<a href=\"https:\/\/www.youtube.com\/watch?v=wlJkQEC2LNQ\" target=\"_blank\" rel=\"noopener\">watch George Phillips<\/a> with his mind blowing automatic migration concept.<\/p>"},{"title":"HugoConf 2023","link":"https:\/\/hugocodex.org\/blog\/hugoconf-2023\/","pubDate":"Tue, 19 Sep 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/hugoconf-2023\/","description":"<p>After last year\u2019s successful HugoConf, with 32 speakers and more than 500 registered attendees from 49 countries, we at CloudCannon had so much fun producing and taking part that they decided to do it again!<\/p>\n<p>Since its first public version, released back in 2013, Hugo has become an incredibly popular static site generator, most well known for its build speeds. Hugo is also the go-to tool of many of CloudCannon\u2019s Partners and Experts, who bring live visual editing to their non-technical clients with the help of our CMS.<\/p>"},{"title":"New auto-collapsing menu","link":"https:\/\/hugocodex.org\/blog\/new-auto-collapsing-menu\/","pubDate":"Mon, 06 Mar 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/new-auto-collapsing-menu\/","description":"<p>In my \n\n  <a href=\"https:\/\/hugocodex.org\/blog\/creating-a-menu-with-nested-pages\/\">previous version<\/a> of the auto-collapsing (nested) menu I chose to avoid Hugo&rsquo;s subsections. However, due to an update of the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/breadcrumbs\/\">breadcrumbs<\/a>, I was motived to test the possibility to create a nested menu based on sections and subsections. I succeeded and the code became much cleaner\/shorter and simpler, especially due to the &lsquo;.Ancestors&rsquo; variable. The way to determine if a page is &lsquo;active&rsquo; is done through the following code:<\/p>\n<pre tabindex=\"0\"><code>{{ if or (in $.ancestors .) (eq $.curRelPermalink .RelPermalink) }}active{{ end }}\n<\/code><\/pre><p>To check if it has children we simply check the length of the .Pages variable:<\/p>"},{"title":"Breadcrumbs since Hugo v0.109.0","link":"https:\/\/hugocodex.org\/blog\/breadcrumbs-since-1-09\/","pubDate":"Sun, 19 Feb 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/breadcrumbs-since-1-09\/","description":"<p>This is a \n<a href=\"https:\/\/discourse.gohugo.io\/t\/breadcrumb-gives-error-when-two-files-in-different-folders-have-the-same-name\/42972\/4\" target=\"_blank\" rel=\"noopener\">true gem<\/a> by Joe Mooring:<\/p>\n<blockquote>\n<p>Generating a trail of breadcrumbs became much simpler with Hugo v0.109.0 and later. Use the .Ancestors method on .Page.<\/p><\/blockquote>\n<pre tabindex=\"0\"><code>&lt;ul id=&#34;breadcrumbs&#34;&gt;\n    {{- range .Ancestors.Reverse }}\n        &lt;li&gt;&lt;a href=&#34;{{ .RelPermalink }}&#34;&gt;{{ .Title }}&lt;\/a&gt;&lt;\/li&gt;\n    {{- end }}\n    &lt;li&gt;&lt;a href=&#34;{{ .RelPermalink }}&#34;&gt;{{ .Title }}&lt;\/a&gt;&lt;\/li&gt;\n&lt;\/ul&gt;\n<\/code><\/pre><p><em>UPDATED 2023-03-06: You can find this code now also in the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/breadcrumbs\/\">breadcrumbs add-on<\/a>.<\/em><\/p>"},{"title":"Instagram solution broken","link":"https:\/\/hugocodex.org\/blog\/instagram-solution-broken\/","pubDate":"Fri, 17 Feb 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/instagram-solution-broken\/","description":"<p>We promoted \n<a href=\"https:\/\/profilepageimages.usecue.com\/\" target=\"_blank\" rel=\"noopener\">Profile Page Images<\/a> on this website, which relied on an integration with the Instagram API. Yesterday the people at Meta decided to disable this integration, because they could not login and find the integration that we were using. We are talking about an integration more than 200 of you apparently had found easily and were using happily (as I can see from the massive amount of bandwidth usage). Note that I was happily providing this tracking-free bandwidth. Privacy is something I care about deeply.<\/p>"},{"title":"Adding analytics to your Hugo website","link":"https:\/\/hugocodex.org\/blog\/adding-analytics-to-your-hugo-website\/","pubDate":"Fri, 03 Feb 2023 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/adding-analytics-to-your-hugo-website\/","description":"<p>To get analytics in a Hugo Jamstack website, you can use one of the following approaches:<\/p>\n<ul>\n<li>Third-party analytics tools such as Google Analytics or Matomo. These tools provide a tracking code that you can embed in your JAMstack website to collect user behavior data.<\/li>\n<li>Custom server-side tracking: You can use a serverless function to track user behavior data and store it in a database.<\/li>\n<li>Use an all-in-one service provider.<\/li>\n<\/ul>\n<p>It should be noted that all three options have their downsides.<\/p>"},{"title":"Shortcodes with usage comments","link":"https:\/\/hugocodex.org\/blog\/shortcodes-with-usage-comments\/","pubDate":"Sun, 13 Nov 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/shortcodes-with-usage-comments\/","description":"<p>I have added usage comments in the heads of my (relevant) shortcodes. You can see the comment in the youtube.html shortcode below:<\/p>\n<pre tabindex=\"0\"><code>&lt;!-- \n{{\/* \n    \n    Usage: \n    {{&lt; youtube id=&#34;qtIqKaDlqXo&#34; image=&#34;\/uploads\/youtubeposter.jpg&#34; &gt;}} \n    \n*\/}}\n--&gt;\n<\/code><\/pre><p>This is not only useful for developers, but is also instructing our own CMS (\n<a href=\"https:\/\/cms.usecue.com\" target=\"_blank\" rel=\"noopener\">Usecue CMS<\/a>) on how to insert these shortcodes. The usage example is read from the comment by the CMS and an insert button is added to the CMS editor field. This makes it easy for your editors\/clients to (re-)use these shortcodes. For more information on this read \n<a href=\"https:\/\/www.usecue.com\/blog\/a-cms-with-hugo-shortcode-support\/\" target=\"_blank\" rel=\"noopener\">A CMS with Hugo shortcode support<\/a>.<\/p>"},{"title":"Hugo webshop ported from Jekyll","link":"https:\/\/hugocodex.org\/blog\/hugo-webshop-ported-from-jekyll\/","pubDate":"Wed, 12 Oct 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/hugo-webshop-ported-from-jekyll\/","description":"<p>I have been wanting to port the webshop from \n<a href=\"https:\/\/jekyllcodex.org\" target=\"_blank\" rel=\"noopener\">https:\/\/jekyllcodex.org<\/a> to this website for a while, but could not find the time to do it. Fortunately, my Spanish friend Fenix wanted to help me out. He ported the Jekyll webshop to Hugo. You can find a \n\n  <a href=\"https:\/\/hugocodex.org\/donate\/\">demo<\/a> by clicking on &lsquo;Donate&rsquo; in the header.<\/p>\n<p>Fenix replaced the layouts with shortcodes, which improved the usability. He also replaced all Liquid code with the Go templating language. The webshop is using Mollie, which is great for European payments. If you want to sell in the US you can replace the dynamic payment link from Mollie with a dynamic Paypal link.<\/p>"},{"title":"New share buttons","link":"https:\/\/hugocodex.org\/blog\/new-share-buttons\/","pubDate":"Wed, 12 Oct 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/new-share-buttons\/","description":"<p>Thanks to \n<a href=\"https:\/\/github.com\/itsguus\" target=\"_blank\" rel=\"noopener\">Guus Groenink<\/a> we now have brand \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/share-buttons\/\">new share buttons<\/a>. I have been working with Guus for quite some time now and the guy is a Hugo KING! He builds Hugo websites on a daily basis for \n<a href=\"https:\/\/www.omelettedufromage.nl\/\" target=\"_blank\" rel=\"noopener\">Omelette Du Fromage<\/a> (an advertising agency). You can see the new buttons in action in our \n\n  <a href=\"https:\/\/hugocodex.org\/blog\/hugo-webshop-ported-from-jekyll\/\">new webshop<\/a> (ported from Jekyll by Fenix) and under every blog post. The share buttons can share to different modern networks, it has embedded (inline) SVG&rsquo;s and it even has a neat config part in the top of the partial. Check it out for yourself in the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/\">Add-ons<\/a> section!<\/p>"},{"title":"Resize all images","link":"https:\/\/hugocodex.org\/blog\/resize-all-images\/","pubDate":"Mon, 04 Jul 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/resize-all-images\/","description":"<p><a class=\"shortcode-vimeo\" href=\"https:\/\/vimeo.com\/727145223\" title=\"Play Vimeo video\" target=\"_blank\">\n    <img src=\"https:\/\/hugocodex.org\/uploads\/resizeallimages_hu_f88dd820a58353da.jpg\" alt=\"Vimeo video 727145223\" \/>\n    <span class=\"playbutton\"><\/span>\n<\/a><\/p>\n\n<style>\n.shortcode-vimeo {\n    position: relative; display: inline-block; margin-top: 1rem;\n}\n.shortcode-vimeo::after {\n    content: \"\";\n    width: 100%;\n    height: 100%;\n    position: absolute;\n    top: 0;\n    left: 0;\n} \n.shortcode-vimeo .playbutton {\n    position: absolute;\n    width: 6rem;\n    height: 4rem;\n    border-radius: 0.65rem;\n    left: 50%;\n    top: 50%;\n    transform: translate(-50%, -50%);\n    background: rgba(0,0,0,0.6) url('data:image\/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOC43NTgiIGhlaWdodD0iMjguODQ5IiB2aWV3Qm94PSIwIDAgNy42MDkgNy42MzMiIHhtbG5zOnY9Imh0dHBzOi8vdmVjdGEuaW8vbmFubyI+PHBhdGggZD0iTTAgMHY3LjYzM2w3LjYwOS0zLjg3NHoiIGZpbGw9IiNmZmYiLz48L3N2Zz4=') 55% center \/ auto 1.9rem no-repeat;\n    z-index: 3;\n}\n.shortcode-vimeo .playbutton:hover {background-color: #00adef;}\n.shortcode-vimeo::after {\n    background: url('data:image\/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgYWx0PSJWaW1lbyIKICAgd2lkdGg9Ijk5LjY0NjYxNCIKICAgaGVpZ2h0PSIyOC4xNjA5OTkiCiAgIHZlcnNpb249IjEuMSIKICAgaWQ9InN2ZzQiCiAgIHNvZGlwb2RpOmRvY25hbWU9InRlc3Quc3ZnIgogICBpbmtzY2FwZTp2Z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QuNzksMy4zNSAtNy45NTUsMy4zNSAtMi42MzUsMCAtNC42MzcsLTAuODUgLTYuMDA2LC0yLjU1IC0wLjk5NywtMS4yNjcgLTEuNTU3LC0yLjg1NCAtMS42NSwtNC43NTIgLTAuMTY2LC0yLjg2MyAwLjg2LC01LjQ5OCAzLjEsLTcuODk0IDIuNDA4LC0yLjY2NSA1LjQyNywtMy45OTMgOS4wNTcsLTMuOTkzIDIuMzM0LDAgNC4wOTgsMC43ODggNS4zLDIuMzQ0IDEuMTMyLDEuNDQzIDEuNjUsMy4yOSAxLjU1Nyw1LjU1IG0gLTUuNjY0LC0wLjE4NSBjIDAuMDMsLTAuOTAzIC0wLjA5NCwtMS43MzMgLTAuMzc0LC0yLjQ4IC0wLjI4LC0wLjc0NyAtMC42OTUsLTEuMTMgLTEuMjI0LC0xLjEzIC0xLjcwMiwwIC0zLjEwMiwwLjkyMyAtNC4yMDIsMi43NiAtMC45MzMsMS41MDMgLTEuNDMsMy4xMSAtMS41MDQsNC44MTIgLTAuMDMsMC44NCAwLjExNCwxLjU3NyAwLjQ0NiwyLjIxIDAuMzY0LDAuNzM2IDAuODgyLDEuMSAxLjU1NiwxLjEgMS41MDUsMCAyLjc5LC0wLjg4MyAzLjg2LC0yLjY1NiAwLjg5MiwtMS40NzIgMS4zOCwtMy4wMDggMS40NCwtNC42MTUgaCAwLjAwMiB6IgogICAgIGZpbGw9IiMxMTIyMzMiCiAgICAgaWQ9InBhdGgyIgogICAgIHN0eWxlPSJmaWxsOiNmZmZmZmYiIC8+Cjwvc3ZnPgo=') calc(100% - 1rem) calc(100% - 1rem) \/ auto 2rem no-repeat;\n}\n.shortcode-vimeo img {\n    display: block;\n    aspect-ratio: 1.7777;\n    object-fit: cover;\n}\n@media (max-width: 45rem) {\n    .shortcode-vimeo .playbutton {width: 16.5vw; height: 11vw; background-size: 5.3vw; border-radius: 1.78vw;}\n    .shortcode-vimeo::after {background-position: calc(100% - 3vw) calc(100% - 3vw); background-size: auto 5vw;}\n}\n<\/style>\n\n<p>Thank you for joining this Lightning talk about &lsquo;image resizing&rsquo;. Hugo is known for its fast page loads. However, if you want to get instantly loading webpages, you also need to resize your images properly. Fortunately Hugo can resize images by itsself. In this talk I will tell you how you can configure Hugo so that it automatically resizes and compresses all images in your project, even the ones that are uploaded through an external CMS by your client.<\/p>"},{"title":"Image compression for the lazy","link":"https:\/\/hugocodex.org\/blog\/image-compression-for-the-lazy\/","pubDate":"Sun, 19 Jun 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/image-compression-for-the-lazy\/","description":"<p>No, this is not about lazy loading. We are talking about image compression only, as images are an important part of your page load (20% on average). Every byte counts when you want to \n<a href=\"https:\/\/www.usecue.com\/blog\/how-to-get-a-100-google-lighthouse-score\/\" target=\"_blank\" rel=\"noopener\">get a 100% Google Lighthouse Score<\/a>. I was happy to find that \n<a href=\"https:\/\/github.com\/borismus\/image-zoom\" target=\"_blank\" rel=\"noopener\">Boris Smus<\/a> did some great \n<a href=\"https:\/\/web.dev\/easy-high-dpi-images\/\" target=\"_blank\" rel=\"noopener\">ground work<\/a> on \n<a href=\"https:\/\/www.filamentgroup.com\/lab\/compressive-images.html\" target=\"_blank\" rel=\"noopener\">this topic<\/a>, suggesting that a &lsquo;highly compressed 2x image is smaller in size and looks better than the uncompressed 1x image&rsquo;. I used one of Boris his examples to illustrate this article, in which we will try to avoid any visible compression artifacts, while still compressing our image(s) significantly.<\/p>"},{"title":"Carousel updated","link":"https:\/\/hugocodex.org\/blog\/carousel-updated\/","pubDate":"Mon, 23 May 2022 13:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/carousel-updated\/","description":"<p>Half a year ago I \n\n  <a href=\"https:\/\/hugocodex.org\/blog\/lightweight-slider-carousel-added\/\">created<\/a> a slider\/carousel for Hugo, based on \n<a href=\"https:\/\/codepen.io\/joosts\/pen\/MWJBPgo\" target=\"_blank\" rel=\"noopener\">this codepen<\/a>. Today I updated the code and fixed a bug (the bullets did not show the right position on mobile while swiping). The code now has an &rsquo;event listener&rsquo; to detect scrolling and I added a debounce function from \n<a href=\"https:\/\/gomakethings.com\/debouncing-your-javascript-events\/\" target=\"_blank\" rel=\"noopener\">Chris Ferdinandi<\/a>, who happens to be an avid Hugo user as well. It should now be responsive and buttery smooth.<\/p>\n<p>Another thing that has changed is the responsiveness. For a website I was building I needed the slider to have a dynamic amount of slides. I managed to make the slider fully responsive. You might need a reload (because I wanted to prevent expensive resize listeners), but you can let CSS determine how many slides your carousel shows. The carousel will change accordingly.<\/p>"},{"title":"Spanish language added","link":"https:\/\/hugocodex.org\/blog\/spanish-language-added\/","pubDate":"Wed, 11 May 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/spanish-language-added\/","description":"<p>Still in early beta, and far from fully translated, is our \n\n  <a href=\"https:\/\/hugocodex.org\/es\/\">Spanish version of this website<\/a>. Do not expect the Spanish version to hold (exactly) the same information as the English one, as the Spanish version is maintained by Fenix, while the English version is maintained by me (Joost). Fenix is very passionate about Hugo and &rsquo;the stackless way&rsquo;. We share the same vision on web development. We meet every week to discuss &lsquo;all things Hugo&rsquo; and we even do some website assignments together. All in all a great collaboration! I am looking forward to Fenix his contributions on the Hugo Codex website!<\/p>"},{"title":"Resize markdown images","link":"https:\/\/hugocodex.org\/blog\/resize-markdown-images\/","pubDate":"Fri, 08 Apr 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/resize-markdown-images\/","description":"<p>Before 2015 I was building WordPress websites. Some things in WordPress I really liked. One of them was the image resizing. When I switched to Jekyll in 2015 I found out that I could no longer resize images automatically. Fortunately, I found \n<a href=\"https:\/\/images.weserv.nl\" target=\"_blank\" rel=\"noopener\">images.weserv.nl<\/a>, a Dutch image resizing service. This service was smarter than WordPress. It resized your images on the fly and kept it in their cache for 30 days. An excellent strategy. However, images in my markdown were still not resized, often resulting in huge page loads.<\/p>"},{"title":"Reasons to upgrade Hugo to version 0.96","link":"https:\/\/hugocodex.org\/blog\/reasons-to-upgrade-to-0-96\/","pubDate":"Sat, 02 Apr 2022 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/reasons-to-upgrade-to-0-96\/","description":"<p>My main reason to upgrade Hugo (from version 0.81) to version 0.96 was the language support for dates. This means that I no longer need complex lookups to get a language specific date display. I can now simply set the following things in my config file:<\/p>\n<pre tabindex=\"0\"><code>defaultContentLanguage: nl\nlanguageCode: nl_NL\n<\/code><\/pre><p>This allows me to output a language specific date using: <code>{{ .Date | time.Format &quot;:date_long&quot; }}<\/code>. Which results in a Dutch date like this: &lsquo;2 april 2022&rsquo;. Great, right?<\/p>"},{"title":"Creating a menu with nested pages","link":"https:\/\/hugocodex.org\/blog\/creating-a-menu-with-nested-pages\/","pubDate":"Thu, 23 Dec 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/creating-a-menu-with-nested-pages\/","description":"<p>A lot of websites use an \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/nested-menu\/\">auto-collapsing menu<\/a>. It is a great and compact way to show a lot of content in a structured way, but it requires a hierarchical view of all your pages. This post explains how to do that.<\/p>\n<h2 id=\"different-approaches\">Different approaches<\/h2>\n<p>I tried some different approaches. I started out with the assumption that I was not allowed to use folders in sections. I was under the impression that a folder in a section would create a subsection. Therefore I started with a parent reference in the front matter. Once I found out that I actually WAS allowed to use subfolders, as long as I refrained from using an &lsquo;index.md&rsquo; or an &lsquo;_index.md&rsquo; file, I rewrote the script. I assumed that the folder structure would be reflected in my permalinks. This, however, turned out to be a false assumption as well. Therefore I rewrote the script a second time. This time I made it look at the filepath. It is fully independent of the permalinks used and therefore works in a multilingual setup with custom permalinks defined in the config file and the front matter.<\/p>"},{"title":"Youtube shortcode added","link":"https:\/\/hugocodex.org\/blog\/youtube-shortcode-added\/","pubDate":"Fri, 10 Dec 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/youtube-shortcode-added\/","description":"<p>I added a brand new &lsquo;add-on&rsquo;: a GDPR compliant way to \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/youtube-shortcode\/\">add Youtube to your Hugo website<\/a> using a shortcode. It is inspired by the code of Paul Irish. Installation is super simple. I even base64 encoded the images for you. All you need to do is put the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/youtube-shortcode\/\">Youtube shortcode<\/a> in your shortcodes directory and you are good to go!<\/p>\n<p>Happy coding!<\/p>"},{"title":"Breadcrumbs updated","link":"https:\/\/hugocodex.org\/blog\/breadcrumbs-updated\/","pubDate":"Thu, 09 Dec 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/breadcrumbs-updated\/","description":"<p>I have been building Hugo websites for half a year now some, and I am a BIG fan. Sure the documentation is a bit weird or incomplete at times. Where do you find the variable &lsquo;resources&rsquo; (all lowercase), for example? I don&rsquo;t know. On the other hand, the \n<a href=\"https:\/\/discourse.gohugo.io\/\" target=\"_blank\" rel=\"noopener\">Discourse channel<\/a> is absolutely amazing. The time people are devoting to help everybody out is just mind blowing.<\/p>\n<p>In the past six months I have stuggled a lot and learned a lot. So, when I looked back at the code I used for my \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/breadcrumbs\/\">breadcrumbs<\/a> (which I created more than half a year ago), I saw that I could improve it&hellip; and I did.<\/p>"},{"title":"A new CMS for Hugo websites","link":"https:\/\/hugocodex.org\/blog\/a-new-cms-for-hugo-websites\/","pubDate":"Fri, 19 Nov 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/a-new-cms-for-hugo-websites\/","description":"<p>Netlify did some research on \n<a href=\"https:\/\/www.usecue.com\/blog\/jamstack-is-eating-the-world\/\" target=\"_blank\" rel=\"noopener\">the priorities of Jamstack developers<\/a>. The thing Jamstack developers value most is &lsquo;performance&rsquo;, which explains Hugo&rsquo;s popularity. Hugo is the absolute king of performance. There is no SSG that is as fast as Hugo. Other priorities of Jamstack developers are uptime, security and speed of development, which are generally good for any Jamstack project. However, we know (and see in the data) that people increasingly struggle to get their Jamstack website compliant. This is probably caused by the distributed nature of Jamstack projects. A Jamstack project combines multiple services from multiple providers. This means you will have to check each vendor for compliancy. We also see that people increasingly worry about vendor lock-in. Each vendor requires you to learn how their software works. This is the reason those Jamstack channels are filled with commercial blog posts and ads. Once you have invested time into learning to use a certain vendors solution, you have created yourself a lock-in. Changing to another provider would mean learning to use another solution, thus investing extra time you probably don&rsquo;t have.<\/p>"},{"title":"Lessons learned porting from Jekyll","link":"https:\/\/hugocodex.org\/blog\/lessons-learned-porting-from-jekyll\/","pubDate":"Sun, 19 Sep 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/lessons-learned-porting-from-jekyll\/","description":"<p>I have been buiding around 30 Jekyll websites per year in the last 6 years. I recently switched completely to Hugo and I have been porting multiple websites from Jekyll to Hugo. I learned a few things along the way that you will need to know too, when you make the step from Jekyll to Hugo. I have been having a hard time learning Hugo, but in the end it was worth it, especially because of the low build times and the build-in image conversion I have gained.<\/p>"},{"title":"Lightweight slider\/carousel added","link":"https:\/\/hugocodex.org\/blog\/lightweight-slider-carousel-added\/","pubDate":"Sat, 21 Aug 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/lightweight-slider-carousel-added\/","description":"<p>A lot of websites have a slider (or carousel). Most of them in the header. The big question is: \n<a href=\"https:\/\/shouldiuseacarousel.com\/\" target=\"_blank\" rel=\"noopener\">Should I add a carousel<\/a> to my Hugo website? This is something I cannot decide for you. If you decide you need one, I added a decent one under \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/slider-carousel\/\">Add ons &gt; Slider\/carousel<\/a> in the main menu. A demo is shown below:<\/p>\n\n\n\n\n<div id=\"carousel0\" class=\"carousel\" duration=\"7000\">\n    <ul>\n      \n        <li id=\"c0_slide1\" style=\"min-width: calc(100%\/1); padding-bottom: 500px;\"><img src=\"https:\/\/hugocodex.org\/uploads\/slider\/image1.jpg\" alt=\"\" \/><div><div>1<\/div><\/div><\/li>\n      \n        <li id=\"c0_slide2\" style=\"min-width: calc(100%\/1); padding-bottom: 500px;\"><img src=\"https:\/\/hugocodex.org\/uploads\/slider\/image2.jpg\" alt=\"\" \/><div><div>2<\/div><\/div><\/li>\n      \n        <li id=\"c0_slide3\" style=\"min-width: calc(100%\/1); padding-bottom: 500px;\"><img src=\"https:\/\/hugocodex.org\/uploads\/slider\/image3.jpg\" alt=\"\" \/><div><div>3<\/div><\/div><\/li>\n      \n        <li id=\"c0_slide4\" style=\"min-width: calc(100%\/1); padding-bottom: 500px;\"><img src=\"https:\/\/hugocodex.org\/uploads\/slider\/image4.jpg\" alt=\"\" \/><div><div>4<\/div><\/div><\/li>\n      \n    <\/ul>\n    <ol>\n      \n        <li><a href=\"#c0_slide1\"><\/a><\/li>\n      \n        <li><a href=\"#c0_slide2\"><\/a><\/li>\n      \n        <li><a href=\"#c0_slide3\"><\/a><\/li>\n      \n        <li><a href=\"#c0_slide4\"><\/a><\/li>\n      \n    <\/ol>\n    <div class=\"prev\">&lsaquo;<\/div>\n    <div class=\"next\">&rsaquo;<\/div>\n<\/div>\n\n<p>The carousel is based on a \n<a href=\"https:\/\/codepen.io\/joosts\/pen\/MWJBPgo\" target=\"_blank\" rel=\"noopener\">carousel with CSS scroll snap<\/a> that I created earlier. On desktop you can interact with the arrows and the bullets, on mobile you can swipe. This carousel supports native lazy loading and will &lsquo;pause&rsquo; on hover. It even kinda works without Javascript. This carousel weighs only 3kb (uncompressed). This is 50 times less than the 150kb JS file you need to load for something like \n<a href=\"https:\/\/swiperjs.com\/\" target=\"_blank\" rel=\"noopener\">SwiperJS<\/a> (which has awesome features by the way).<\/p>"},{"title":"Image gallery added","link":"https:\/\/hugocodex.org\/blog\/image-gallery-added\/","pubDate":"Sun, 20 Jun 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/image-gallery-added\/","description":"<p>I have ported the Image Gallery from Jekyll Codex to Hugo Codex. A very exciting process as Hugo is able to resize the images without a third party. I have added two ways to include the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/image-gallery\/\">image gallery<\/a>: as a shortcode and as a partial (to use in the layout). I hope you like it, I sure do.<\/p>"},{"title":"Three and a half years later","link":"https:\/\/hugocodex.org\/blog\/three-and-a-half-years-later\/","pubDate":"Sun, 06 Jun 2021 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/three-and-a-half-years-later\/","description":"<p>I already told you that \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/blog\/migrating-from-jekyll-to-hugo\/\">migrating from Jekyll to Hugo<\/a> was a lot harder than I thought. But I had not expected that I would not look at Hugo for another 3.5 years.<\/p>\n<h3 id=\"what-changed\">What changed?<\/h3>\n<p>First of all \n<a href=\"https:\/\/www.cloudcannon.com\" target=\"_blank\" rel=\"noopener\">CloudCannon<\/a> started building Hugo websites, while \n<a href=\"https:\/\/www.forestry.io\" target=\"_blank\" rel=\"noopener\">Forestry<\/a> stopt doing so. I am a big fan of CloudCannon, I have been asked to write blog posts for them and I am featured on their website, so I definitely wanted to take Hugo for a spin on their infrastructure. Secondly, I had a few websites that were becoming quite slow due to their increasing size. Jekyll has improved its speed drasticly in the last few years, but build times of 20+ seconds were still common for my bigger websites (3k+ pages). I started experimenting with GoJekyll and got enthusiastic about the 1.4 seconds build times. However, I immediately found some bugs in GoJekyll and some limitations in blackfriday (GoJekyll&rsquo;s Markdown converter). I also noticed that both Netlify and CloudCannon were switching to a pricing model where you are paying for build minutes. I get that&hellip; but it gave Hugo an extra advantage over Jekyll as Hugo builds 20 times faster (thus cheaper). This made me look at Hugo again with new eyes. A massively popular and mature project with over 50k stars on Github.<\/p>"},{"title":"Getting started with Hugo","link":"https:\/\/hugocodex.org\/blog\/getting-started-with-hugo\/","pubDate":"Tue, 02 Jan 2018 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/getting-started-with-hugo\/","description":"<h2 id=\"step-1-create-a-basic-website\">Step 1. Create a basic website<\/h2>\n<p>A website typically consists of a few elements. The header with a menu, a sidebar, the content and the footer. Back in the days we used frames to put these components together. Nowadays we use includes. These includes require a programming language to work, like PHP. Using PHP however introduces a lot of vulnerabilities. What if we could prevent that by design? Well&hellip; you can with Hugo&hellip;<\/p>"},{"title":"Migrating from Jekyll to Hugo","link":"https:\/\/hugocodex.org\/blog\/migrating-from-jekyll-to-hugo\/","pubDate":"Sun, 10 Dec 2017 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/blog\/migrating-from-jekyll-to-hugo\/","description":"<p>Let me be honest. Migrating from Jekyll to Hugo was not as easy as I thought.<\/p>\n<p>The first problem was understanding the folder structure. The Hugo manual was not very clear about the best practise. I have figured out that you need at least three files. You need an &lsquo;home.html&rsquo; for the front page which you should place in your &rsquo;layouts&rsquo; folder. Additionally you need a &lsquo;page.html&rsquo; and a &rsquo;list.html&rsquo; file in it. Their name tells you what they do: listing the content of a specific content type (section) and displaying a single content file. If you want an alternative list template for &lsquo;posts&rsquo; (or any other content type, called &lsquo;section&rsquo;), just create a folder in your &rsquo;layouts&rsquo; folder with the name of your content type, in this case &lsquo;posts&rsquo;.<\/p>"},{"title":"1. Install Hugo","link":"https:\/\/hugocodex.org\/getting-started\/1-install-hugo\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/1-install-hugo\/","description":"<p>There are \n<a href=\"https:\/\/gohugo.io\/getting-started\/installing\/\" target=\"_blank\" rel=\"noopener\">many ways<\/a> to install Hugo. The best thing about Hugo is that installing is\/can be very simple. It basically all comes down to the same thing:<\/p>\n<p>On Windows you should download the Windows version (tar.gz), uninstall it in your project folder and run &lsquo;hugo server&rsquo; from the command line. On a Mac you should download the MacOS version (tar.gz), uninstall it in your project folder and run &lsquo;hugo server&rsquo; from the command line. On a Linux machine you should install Hugo by typing &lsquo;sudo apt install hugo&rsquo;. Then go to your project folder and run &lsquo;hugo server&rsquo; from the command line. If you want the latest version you can download the .deb file and install it with the same command (replace &lsquo;hugo&rsquo; with the name of your .deb file).<\/p>"},{"title":"2. Create some HTML","link":"https:\/\/hugocodex.org\/getting-started\/2-create-html\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/2-create-html\/","description":"<p>Now we have Hugo installed, let&rsquo;s start with a very simple webpage. First you have to create two files. First you create an empty file called &lsquo;hugo.yaml&rsquo;. Then you create a file called &lsquo;home.html&rsquo; with some simple HTML:<\/p>\n<pre tabindex=\"0\"><code>&lt;html&gt;\n&lt;head&gt;&lt;\/head&gt;\n&lt;body&gt;\n    This is a very simple webpage\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre><p>You have to store the &lsquo;hugo.yaml&rsquo; file in the root of your project and the &lsquo;home.html&rsquo; file in a directory called &rsquo;layouts&rsquo;. Your project will now look like this:<\/p>"},{"title":"3. Add your first content","link":"https:\/\/hugocodex.org\/getting-started\/3-add-content\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/3-add-content\/","description":"<p>Now we have an &lsquo;index.html&rsquo; file, we are going to separate the code from the content. Hugo uses \n<a href=\"https:\/\/www.markdownguide.org\/cheat-sheet\/\" target=\"_blank\" rel=\"noopener\">Markdown<\/a> for this. All content is saved in &lsquo;.md&rsquo; (Markdown) files in a &lsquo;content&rsquo; directory in the root of your project. Create a Markdown file, called &lsquo;_index.md&rsquo;, that looks like this:<\/p>\n<pre tabindex=\"0\"><code>---\ntitle: My first content file\n---\nMy first paragraph in Markdown\n<\/code><\/pre><p>Save the file in the &lsquo;content&rsquo; directory. Now change your &lsquo;\/layouts\/home.html&rsquo; file, so it look like this:<\/p>"},{"title":"4. Include your first partials","link":"https:\/\/hugocodex.org\/getting-started\/4-include-partials\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/4-include-partials\/","description":"<p>A website typically consists of a few elements that get repeated on every page, like a header with a menu and a footer. Instead of adding them to every page, you can use a &lsquo;partial&rsquo;. Partials need to be saved in the &lsquo;\/layouts\/_partials&rsquo; directory.<\/p>\n<p>Create a &lsquo;header.html&rsquo; file that looks like this:<\/p>\n<pre tabindex=\"0\"><code>&lt;html&gt;\n&lt;head&gt;&lt;\/head&gt;\n&lt;body&gt;\n<\/code><\/pre><p>Create a &lsquo;footer.html&rsquo; file that looks like this:<\/p>\n<pre tabindex=\"0\"><code>&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre><p>Store both files in the &lsquo;\/layouts\/_partials&rsquo; directory. Now update your &lsquo;\/layouts\/home.html&rsquo; file and make sure it looks like this (replacing the code with links to the partials):<\/p>"},{"title":"5. Add another content file","link":"https:\/\/hugocodex.org\/getting-started\/5-add-other-content\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/5-add-other-content\/","description":"<p>Our website is taking shape ;-). But we are missing a nice contact page. To create it, we should create a file &lsquo;\/content\/contact.md&rsquo;. This file should look like this:<\/p>\n<pre tabindex=\"0\"><code>---\ntitle: Contact page\n---\nSend me an email at joost@vdschee.nl\n<\/code><\/pre><p>We already had a layout file (home.html), but that file was only valid for the homepage. Therefore we now need another file. This file can be an exact copy of the &lsquo;home.html&rsquo; file and you should name it &lsquo;page.html&rsquo;. You must store this file in the &lsquo;\/layouts\/&rsquo; directory.<\/p>"},{"title":"6. Add a blog","link":"https:\/\/hugocodex.org\/getting-started\/6-add-a-blog\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/getting-started\/6-add-a-blog\/","description":"<p>Every website has a news section or a blog. That is why are going to add a &lsquo;posts&rsquo; directory to our content folder. In this new directory we create a markdown file named &lsquo;hello-world.md&rsquo;, which is our first post. This file should look like this:<\/p>\n<pre tabindex=\"0\"><code>---\ntitle: Hello world\ndate: 2016-02-01 10:00:00\n---\nThis is my first blog post\n<\/code><\/pre><p>The date should be the current date. The time is optional. Additionally we are going to add a (new) layout file for our blog overview (a list view of our posts). Hugo requires you to name this file &lsquo;section.html&rsquo; and store it in the &rsquo;layouts&rsquo; directory. This file looks like this:<\/p>"},{"title":"About Hugo Codex","link":"https:\/\/hugocodex.org\/about\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/about\/","description":"<blockquote>\n<p>&ldquo;Hugo Codex wants to make it easier for you to choose for Hugo in your next project.&rdquo;<\/p><\/blockquote>\n<h3 id=\"for-front-end-developers\">For front-end developers<\/h3>\n<p>Hugo Codex is created by Fenix and Joost to make it easier for fellow front-end developers to choose for static web technology in their next project. The \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/getting-started\/\">getting started guide<\/a> lets you start from scratch. If you want to know more about Hugo, please visit the official Hugo documentation. The link can be found in the menu at the top.<\/p>"},{"title":"Auto-collapsing menu","link":"https:\/\/hugocodex.org\/add-ons\/nested-menu\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/nested-menu\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>A lot of websites use auto-collapsing menu&rsquo;s with nested pages. They are a great way to show a lot of content in a structured way, but it requires a hierarchical view of all your pages. This is a nested menu that can be added through a simple include. If you want to see this in action, you can \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/branches\/\">view a demo<\/a>.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>This script reads the folders in your section and automatically creates an auto-collapsing nested menu. Note that you are NOT allowed to use an &lsquo;index.md&rsquo; file in your folders. You DO, however, need an _index.md in a folder that contains other pages. Please look at the \n<a href=\"https:\/\/github.com\/jhvanderschee\/hugocodex\/tree\/main\/content\/en\/branches\" target=\"_blank\" rel=\"noopener\">directory structure<\/a> of the demo for a clarification.<\/p>"},{"title":"Branche 1.1.1","link":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_1\/branche1_1_1\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_1\/branche1_1_1\/","description":{}},{"title":"Branche 1.1.2","link":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_1\/branche1_1_2\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_1\/branche1_1_2\/","description":{}},{"title":"Branche 1.2","link":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_2\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_2\/","description":{}},{"title":"Branche 1.3","link":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_3\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/branche1\/branche1_3\/","description":{}},{"title":"Branche 2","link":"https:\/\/hugocodex.org\/branches\/branche2\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/branche2\/","description":{}},{"title":"Breadcrumbs","link":"https:\/\/hugocodex.org\/add-ons\/breadcrumbs\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/breadcrumbs\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Breadcrumb paths are a single line of links (often placed above the title) that show a page&rsquo;s location in the site hierarchy. Every website should have breadcrumbs, as it benefits SEO as well as the users understanding of the sites structure.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>This code looks at the Ancestors variable to create the breadcrumb path. This approach has a small footprint. Additionally, this code does not require the breadcrumbs to be explicitly defined in the front matter \/ YAML.<\/p>"},{"title":"Cart","link":"https:\/\/hugocodex.org\/donate\/cart\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/cart\/","description":"<div id=\"shoppingcart\">\n                <table celpadding=\"0\" cellspacing=\"0\">\n                    <thead>\n                        <tr>\n                            <th><\/th>\n                            <th><\/th>\n                            <th><\/th>\n                            <th>Quantity<\/th>\n                            <th>&nbsp;&nbsp; Price<\/th>\n                        <\/tr>\n                    <\/thead>\n                    <tbody>\n                        <tr>\n                            <td colspan=\"6\" style=\"text-align: center;\"><\/td>\n                        <\/tr>\n                    <\/tbody>\n                <\/table>\n\n                <div>&euro; <span class=\"carttotal\">0.00<\/span><\/div>\n\n                <form action=\"https:\/\/hugocodex.org\/donate\/checkout\/\"><div class=\"submitbutton\"><a href=\"https:\/\/hugocodex.org\/donate\" class=\"gray\">continue shopping<\/a><input type=\"submit\" value=\"Proceed to checkout\"\/><\/div><\/form>\n\n            <\/div>\n\n            <div style=\"margin-top: 50px; position: relative; top: 30px;\">\n                    <ul id=\"checkout_progress\">\n                        <li class=\"current\"><span><a href=\"#\">Shopping cart<\/a><\/span><\/li><li><span><span>Checkout<\/span><\/span><\/li><li><span><span>Payment<\/span><\/span><\/li>\n                    <\/ul>\n            <\/div>\n        <\/div>\n    <\/div>"},{"title":"Checkout","link":"https:\/\/hugocodex.org\/donate\/checkout\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/checkout\/","description":"<div id=\"checkout\">\n                <form action=\"https:\/\/hugocodex.org\/donate\/paylink\/\" method=\"post\" onchange=\"setAddons(this)\">\n                    <input name=\"_gotcha\" style=\"display:none\" type=\"text\">\n                    <input name=\"_to\" type=\"hidden\" value=\"joost@vdschee.nl\">\n                    <input name=\"_subject\" value=\"New order!\" type=\"hidden\">\n                    <input name=\"ordernumber\" value=\"\" type=\"hidden\">\n\n                    <div class=\"half\">\n                        <label for=\"firstname\">First name<\/label>\n                        <input type=\"text\" name=\"firstname\" required \/>\n                    <\/div>\n\n                    <div class=\"half\">\n                        <label for=\"lastname\">Last name<\/label>\n                        <input type=\"text\" name=\"lastname\" required \/>\n                    <\/div>\n\n                    <div>\n                        <label for=\"email\">Email address<\/label>\n                        <input type=\"email\" name=\"email\" required \/>\n                    <\/div>\n\n                    <div>\n                        <label for=\"address\">Address<\/label>\n                        <input type=\"text\" name=\"address\" required \/>\n                    <\/div>\n\n                    <div class=\"half\">\n                        <label for=\"zipcode\">Zipcode<\/label>\n                        <input type=\"text\" name=\"zipcode\" required \/>\n                    <\/div>\n\n                    <div class=\"half\">\n                        <label for=\"city\">City<\/label>\n                        <input type=\"text\" name=\"city\" required \/>\n                    <\/div>\n\n                    <div>\n                        <label for=\"shipping\">Shipping<\/label>\n                        <select name=\"shipping\" required onchange=\"if(this.value == 'NL') document.querySelector('input[name=\\'country\\']').value = 'The Netherlands'; else document.querySelector('input[name=\\'country\\']').value = ''\">\n                            <option value=\"\"><\/option>\n                            <option value=\"NL\" data-title=\"Shipping NL\">The Netherlands (+ &euro; 0.00)<\/option>\n                            <option value=\"EU\" data-title=\"Shipping EU\" data-price=\"7.5\">European Union (+ &euro; 7.50)<\/option>\n                            <option value=\"World\" data-title=\"Shipping World\" data-price=\"15\">Rest of the world (+ &euro; 15.00)<\/option>\n                        <\/select>\n                    <\/div>\n\n                    <div>\n                        <label for=\"country\">Country<\/label>\n                        <input type=\"text\" name=\"country\" required \/>\n                    <\/div>\n\n                    <div>\n                        <label>Gift wrapping<\/label>\n                        <label><input type=\"radio\" name=\"wrapped\" value=\"no\" required> Not gift wrapped<\/label>\n                        <label><input type=\"radio\" name=\"wrapped\" data-title=\"Gift wrapped\" value=\"yes\" data-price=\"2\" required>  (+ &euro; 2.00)<\/label>\n                    <\/div>\n\n                    <div>\n                        <label for=\"message\">Message<\/label>\n                        <textarea name=\"message\"><\/textarea>\n                    <\/div>\n\n                    <div class=\"submitbutton\"><a href=\"https:\/\/hugocodex.org\/donate\/cart\/\" class=\"gray\">back to cart<\/a><input type=\"submit\" value=\"Proceed to payment\" onclick=\"setOrderNumber(this.parentNode.parentNode);\" \/><\/div>\n\n                <\/form>\n                <div>\n                    <label style=\"padding-top: 0.8rem;\">Payment total<\/label>\n                    <div id=\"checkoutcalculation\">\n                        <span>Shopping cart: <\/span>\u20ac 0.00\n                    <\/div>\n                    <p><em>Payments are 100% secure and will be handled by either Mollies Paylink service, called Plink, or Paypal.me. In the next screen you will be redirected to a secure\ncheckout process on either useplink.com or paypal.me.<\/em><\/p>"},{"title":"Cookie consent","link":"https:\/\/hugocodex.org\/add-ons\/cookie-consent\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/cookie-consent\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>To be compliant with the GDPR, you have to have user consent for all non-functional and third party cookies and scripts. This can be done by adding this &lsquo;cookie consent banner&rsquo; to the footer of the website. This banner gives you a detailed overview and fine grained control over the scripts that are loaded.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>The code inserts a consent banner at the bottom of the screen. When you click &lsquo;Deny&rsquo;, &lsquo;Allow&rsquo;, &lsquo;Allow all&rsquo; or &lsquo;Save preferences&rsquo; it creates a cookie that is valid for 31 days. Each page load the code checks for the existence of this cookie. If it exists, it will check which scripts are allowed. If it does not exist, the page will only load the functional scripts. Scripts are managed in a &lsquo;consent.yaml&rsquo; file in the data directory. Visitors can set or review their consent by clicking on a link with a &lsquo;manage-consent&rsquo; class, like this one: <a class=\"manage-consent\" href=\"#manage-consent\">manage consent<\/a>. Hint: place at least one of these links in the footer of your website. Do you want to reset the behaviour of this banner? Remove the &lsquo;consent-settings&rsquo; cookie in your browser, or press this <a href=\"#\" onclick=\"eraseCookie('consent-settings'); location.reload();\">reset link<\/a>.<\/p>"},{"title":"Form builder","link":"https:\/\/hugocodex.org\/add-ons\/form-builder\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/form-builder\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Forms are the most important parts of a websites. They range from simple contact forms to forms that handle complete webshop orders or event sign-ups. WordPress has extremely popular form solutions, like \u2018Contact Form 7\u2019 and \u2018Gravity Forms\u2019, but Hugo does not. To fill this void I created a basic form builder for Hugo.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>The form uses HTML5. The form can be submitted by CloudCannon or Netlify. The first only works on CloudCannon hosting. You can choose between showing placeholders in the inputs or labels above it. Two special fields are available: a field named \u2018name\u2019 (type \u2018text\u2019) will show \u2018first name\u2019 and \u2018last name\u2019 input boxes on one line. A field named \u2018address\u2019 (type \u2018text\u2019) will show \u2018address\u2019, \u2018city\u2019 and \u2018postal code\u2019 input boxes.<\/p>"},{"title":"Image gallery","link":"https:\/\/hugocodex.org\/add-ons\/image-gallery\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/image-gallery\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>This script creates an image gallery. The script reads all images from a specific (user-defined) folder in the assets directory of Hugo, automagically crops them to 300px squares and shows them in rows of five.<\/p>\n<style>\n    .image-gallery {overflow: auto; margin-left: -1%!important;}\n    .image-gallery li {float: left; display: block; margin: 0 0 1% 1%; width: 19%;}\n    .image-gallery li a {text-align: center; text-decoration: none!important; color: #777;}\n    .image-gallery li a span {display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; padding: 3px 0;}\n    .image-gallery li a img {width: 100%; display: block;}\n<\/style>\n\n\n<ul class=\"image-gallery\">\n<li>\n      <a href=\"https:\/\/hugocodex.org\/uploads\/album\/Beautiful%20Mountains_hu_6e7c6c2a806c7aee.jpg\" title=\"Beautiful Mountains\" class=\"lightbox-image\">\n        <img src=\"https:\/\/hugocodex.org\/uploads\/album\/Beautiful%20Mountains_hu_6e7505bae5dfb74.jpg\" alt=\"Beautiful Mountains\" title=\"Beautiful Mountains\">\n        <span>Beautiful Mountains<\/span>\n      <\/a>\n    <\/li>\n  \n<li>\n      <a href=\"https:\/\/hugocodex.org\/uploads\/album\/Museum%20of%20Pop%20Culture_hu_f7446bffbf157d7f.jpg\" title=\"Museum of Pop Culture\" class=\"lightbox-image\">\n        <img src=\"https:\/\/hugocodex.org\/uploads\/album\/Museum%20of%20Pop%20Culture_hu_9cbc48390e392bcb.jpg\" alt=\"Museum of Pop Culture\" title=\"Museum of Pop Culture\">\n        <span>Museum of Pop Culture<\/span>\n      <\/a>\n    <\/li>\n  \n<li>\n      <a href=\"https:\/\/hugocodex.org\/uploads\/album\/Seattle%20View_hu_a84853b2701a27ee.jpg\" title=\"Seattle View\" class=\"lightbox-image\">\n        <img src=\"https:\/\/hugocodex.org\/uploads\/album\/Seattle%20View_hu_f9478142388483c.jpg\" alt=\"Seattle View\" title=\"Seattle View\">\n        <span>Seattle View<\/span>\n      <\/a>\n    <\/li>\n  \n<li>\n      <a href=\"https:\/\/hugocodex.org\/uploads\/album\/Seattle%20by%20Night_hu_b4e231ff106768.jpg\" title=\"Seattle by Night\" class=\"lightbox-image\">\n        <img src=\"https:\/\/hugocodex.org\/uploads\/album\/Seattle%20by%20Night_hu_5fa6a59d7eab7fdb.jpg\" alt=\"Seattle by Night\" title=\"Seattle by Night\">\n        <span>Seattle by Night<\/span>\n      <\/a>\n    <\/li>\n  \n<li>\n      <a href=\"https:\/\/hugocodex.org\/uploads\/album\/Space%20Needle_hu_98eeadc8293d976c.jpg\" title=\"Space Needle\" class=\"lightbox-image\">\n        <img src=\"https:\/\/hugocodex.org\/uploads\/album\/Space%20Needle_hu_8f5e40e220bd6c45.jpg\" alt=\"Space Needle\" title=\"Space Needle\">\n        <span>Space Needle<\/span>\n      <\/a>\n    <\/li>\n  \n\n<\/ul>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>The script searches for any file in the folder \u2018album\u2019 in the assets directory of Hugo. It creates an image tag with a thumbnail for these images. The thumbnail is a 300 pixel wide square cropped version of the image. The script wraps the thumbnail in a link, which links to a larger version and will trigger a lightbox if present. The caption is the file name without extension.<\/p>"},{"title":"Lightbox","link":"https:\/\/hugocodex.org\/add-ons\/lightbox\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/lightbox\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Lightbox is a solution that loads your \n\n  <a href=\"https:\/\/hugocodex.org\/uploads\/grumpycat2.jpg\">image<\/a> \n\n  <a href=\"https:\/\/hugocodex.org\/uploads\/grumpycat.jpg\">links<\/a>, your \n<a href=\"https:\/\/www.youtube.com\/watch?v=dQw4w9WgXcQ&amp;showinfo=0&amp;rel=0\" target=\"_blank\" rel=\"noopener\">Youtube links<\/a> and your \n<a href=\"https:\/\/vimeo.com\/132888648\" target=\"_blank\" rel=\"noopener\">Vimeo links<\/a> automatically in a minimalistic and responsive pseudo window\/overlay. No adjustment to your links is required, just follow the installation instructions below.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>Links that point to images, Youtube and Vimeo video&rsquo;s are automagically recognized and provided with an additional class by javascript. Video&rsquo;s get an additional data-id in case of a video. A listener adds the lightboxes to the body on a click on the link. The lightboxes is removed when you click on the background\/overlay. You can prevent links from turning into lightboxes, by adding the &rsquo;no-lightbox&rsquo; class.<\/p>"},{"title":"Live chat","link":"https:\/\/hugocodex.org\/add-ons\/live-chat\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/live-chat\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Live Chat is one of the most important features a website can offer. This live chat solution should be free or freemium and it should be very simple for visitors to engage in real time. Also, it should be easy to operate, manage and customize and it should have an mobile app for the operator. I have found these things in \n<a href=\"https:\/\/crisp.chat\/en\/livechat\/\" target=\"_blank\" rel=\"noopener\">Crisp<\/a>, thanks to some extensive research by \n<a href=\"https:\/\/blog.appernetic.io\/2016\/07\/14\/use-live-chat-to-beat-the-competition\/\" target=\"_blank\" rel=\"noopener\">Appernetic<\/a>.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>You create an account at Crisp and add a script in the head or footer of your website. The script inserts the chat module in the website. That&rsquo;s it. An example script is shown below. You should get your personal code from your Crisp account.<\/p>"},{"title":"New window fix","link":"https:\/\/hugocodex.org\/add-ons\/new-window-fix\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/new-window-fix\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>According to many site owners, external links and PDF&rsquo;s should open in a new window. Markdown makes it relatively hard to specify this. This script automates this for you, so you do not have to worry about this.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>This script detects external links and PDF&rsquo;s. It automagically adds &rsquo;target=&quot;_blank&quot;&rsquo; to these links. This is done by the following code.<\/p>\n<p>[expand]<\/p>\n<pre tabindex=\"0\"><code>{{ $link := .Destination }}\n{{ $isRemote := (or (strings.HasPrefix $link &#34;http&#34;) (in (lower $link) &#34;.pdf&#34;)) }}\n{{- if not $isRemote -}}\n  {{ $url := urls.Parse .Destination }}\n  {{- if $url.Path -}}\n    {{ $fragment := &#34;&#34; }}\n    {{- with $url.Fragment }}\n      {{ $fragment = printf &#34;#%s&#34; . }}\n    {{ end -}}\n    {{- with .Page.GetPage $url.Path }}\n      {{ $link = printf &#34;%s%s&#34; .RelPermalink $fragment }}\n    {{ end }}\n  {{ end -}}\n{{- end -}}\n&lt;a href=&#34;{{ $link | safeURL }}&#34;{{ with .Title}} title=&#34;{{ . }}&#34;{{ end }}{{ if $isRemote }} target=&#34;_blank&#34; rel=&#34;noopener&#34;{{ end }}&gt;{{ .Text | safeHTML }}&lt;\/a&gt;\n<\/code><\/pre><p>[\/expand]<\/p>"},{"title":"Payment","link":"https:\/\/hugocodex.org\/donate\/paylink\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/donate\/paylink\/","description":"<h2 id=\"choose-your-payment-method\">Choose your payment method<\/h2>\n<p>You will be paying &lsquo;Usecue&rsquo; and you will see your order number as a reference. You will have to pay \u20ac<span id=\"paymenttotal\"><\/span>.<\/p>\n<p>\u00a0<\/p>\n<div id=\"smart-button-container\" style=\"max-width: 350px;\">\n\n        <input type=\"hidden\" name=\"descriptionInput\" id=\"description\">\n        <input type=\"hidden\" name=\"amountInput\" id=\"amount\">\n        <input type=\"hidden\" name=\"invoiceid\" id=\"invoiceid\">\n\n        <script>\n            window.onload = function() {\n                var amount = getCartTotal() + getAddonTotal();\n                var ordernumber = localStorage.getItem('ordernumber');\n                \n                document.getElementById('description').value = ordernumber;\n                document.getElementById('invoiceid').value = ordernumber;\n                document.getElementById('amount').value = amount;\n            }\n        <\/script>\n        <div style=\"text-align: center; margin-top: 0.625rem;\" id=\"paypal-button-container\"><\/div>\n<\/div>\n\n  <script src=\"https:\/\/www.paypal.com\/sdk\/js?client-id=ARLAOALKgJkpvAynfrxup8sP6NiLzBTpe6leWyLs7QJHnUMsCt8tKKVFWJzLg4zP0jky8IlPddUX2YCt&currency=EUR&components=buttons\"><\/script>\n  <script>\n\n  function initPayPalButton() {\n    \n    var amount = document.querySelector('#smart-button-container #amount');\n    var description = document.querySelector('#smart-button-container #description');\n    var invoiceid = document.querySelector('#smart-button-container #invoiceid');\n\n    var purchase_units = [];\n    purchase_units[0] = {};\n    purchase_units[0].amount = {};\n\n    function validate(event) {\n      return event.value.length > 0;\n    }\n\n    paypal.Buttons({\n      style: {\n        color: 'blue',\n        shape: 'pill',\n        label: 'pay',\n        layout: 'vertical',\n        \n      },\n\n      onInit: function (data, actions) {\n        \n      },\n\n      onClick: function () {\n        \n        purchase_units[0].description = description.value;\n        purchase_units[0].amount.value = amount.value;\n\n        if(invoiceid.value !== '') {\n          purchase_units[0].invoice_id = invoiceid.value;\n        }\n      },\n\n      createOrder: function (data, actions) {\n        return actions.order.create({\n          purchase_units: purchase_units,\n        });\n      },\n\n      onApprove: function (data, actions) {\n        return actions.order.capture().then(function (details) {\n          alert('Transaction completed by ' + details.payer.name.given_name + '!');\n        });\n      },\n\n      onError: function (err) {\n        console.log(err);\n      }\n    }).render('#paypal-button-container');\n  }\n  initPayPalButton();\n  <\/script>"},{"title":"Privacy policy","link":"https:\/\/hugocodex.org\/privacy\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/privacy\/","description":"<h3 id=\"leaseweb-hosting\">Leaseweb hosting<\/h3>\n<p>This website is hosted on Leaseweb servers. Usecue CMS is used as external CMS. Leaseweb (like any hosting company) can have full insight in visitor data, like connecting IP addresses, visited pages, etc. Note that Leaseweb is not known to actively profile visitors. By using a VPN you can (try to) prevent this!<\/p>\n<h3 id=\"google-analytics\">Google Analytics<\/h3>\n<p>This website uses Google Analytics. However, we have taken all actions we can to limit the power of Google. We have configured Google Analytics to anonymize IP addresses, use SSL at all time and we have agreed a Data Processing Amendment with Google. These measures were taken from a derective of the CBP (Dutch Institute for Privacy Protection) from 2018 on how to legally use Google Analytics without explicit consent.<\/p>"},{"title":"Reading time","link":"https:\/\/hugocodex.org\/add-ons\/reading-time\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/reading-time\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>The reading time indicator is a simple script which helps to create a reading indicator displaying the estimated reading time for the content. The script takses advantage of the reading time page variable, already present in Hugo.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>To display the reading time of an article, the code below is used.<\/p>\n<pre tabindex=\"0\"><code>Reading time: {{ .ReadingTime }} minute{{ if (ne .ReadingTime 1) }}s{{ end }}\n<\/code><\/pre><h3 id=\"installation\">Installation<\/h3>\n<p>Step 1. Download the file \n<a href=\"https:\/\/raw.githubusercontent.com\/jhvanderschee\/hugocodex\/main\/layouts\/_partials\/reading-time.html\" target=\"_blank\" rel=\"noopener\">reading-time.html<\/a>\n<br \/>Step 2. Save the file in the &rsquo;layouts\/_partials&rsquo; directory of your project\n<br \/>Step 3. Add the following line to your layout on the place where you want the reading time indicator to appear:<\/p>"},{"title":"Search","link":"https:\/\/hugocodex.org\/search-google\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/search-google\/","description":"<p>Below you can search this site, using the very simple \n\n  <a href=\"https:\/\/hugocodex.org\/without-plugin\/search-google\">Google search box<\/a>. This site search uses the Google cache to find its pages. So if you want to use this too, make sure you have an \n\n  <a href=\"https:\/\/hugocodex.org\/sitemap.xml\">XML sitemap<\/a> installed. This helps Google to find the latest additions to your website.<\/p>"},{"title":"Search","link":"https:\/\/hugocodex.org\/search\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/search\/","description":"<p>Below you can search this site, using the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/search-lunr\/\">Lunr.js search<\/a>. This site search uses a custom index to find its pages.<\/p>"},{"title":"Search with Google","link":"https:\/\/hugocodex.org\/add-ons\/search-google\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/search-google\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Modern websites have a search bar, searching within the site for specific content. These search boxes often search the database in real-time. That is not possible within a static website. Therefore another solution must be found.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>This search relies on the index from Google. It queries the Google Search engine directly. Results will be shown within the Google interface (on a new page), but will be limited to the site you specified.<\/p>"},{"title":"Search with Lunr.js","link":"https:\/\/hugocodex.org\/add-ons\/search-lunr\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/search-lunr\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Modern websites have a search bar, searching within the site for specific content. These search boxes often search the database in real-time. That is not possible within a static website. Therefore another solution must be found. An \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/search\/\">demo<\/a> can be found on the search page.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>This search relies on a local index. It uses the Lunr.js script to search. This script does not require jQuery. First a local index is build, using the documents variable. Then the Lunr.js code is called. Finally a custom-made function (called &rsquo;lunr_search&rsquo;) puts the results in a Google-like style on the screen.<\/p>"},{"title":"Share buttons","link":"https:\/\/hugocodex.org\/add-ons\/share-buttons\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/share-buttons\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>It can be very useful to allow people to easily share the content they have just read. Share buttons are often found on the footer of a blog post. This script automatically adds them to the content you want.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>The script reads the <code>.Permalink<\/code> and creates a share link. The partial has some config options to adjust the colors and the icons that are shown.<\/p>\n<h3 id=\"installation\">Installation<\/h3>\n<p>Step 1. Download the file \n<a href=\"https:\/\/raw.githubusercontent.com\/jhvanderschee\/hugocodex\/main\/layouts\/_partials\/share-buttons.html\" target=\"_blank\" rel=\"noopener\">share-buttons.html<\/a>\n<br \/>Step 2. Save the file in the &rsquo;layouts\/_partials&rsquo; directory of your project\n<br \/>Step 3. Add the following line to your layout on the place where you want the share buttons to appear:<\/p>"},{"title":"Slider\/Carousel","link":"https:\/\/hugocodex.org\/add-ons\/slider-carousel\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/slider-carousel\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>This carousel is based on a \n<a href=\"https:\/\/codepen.io\/joosts\/pen\/MWJBPgo\" target=\"_blank\" rel=\"noopener\">carousel with CSS scroll snap<\/a>. This carousel weighs only 3kb (uncompressed). On desktop you can interact with the arrows and the bullets, on mobile you can swipe. It kinda works without Javascript. This carousel supports native lazy loading (because it uses regular image tags instead of background images). You can put multiple carousels on one page and the carousel will &lsquo;pause&rsquo; on hover.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>Just write a list with only images in you content and the list will automatically be converted into a carousel, like this:<\/p>"},{"title":"Slider\/Carousel (manual)","link":"https:\/\/hugocodex.org\/add-ons\/slider-carousel-manual\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/slider-carousel-manual\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>A lot of websites have a slider (or carousel). Most of them in the header. The big question is: \n<a href=\"https:\/\/shouldiuseacarousel.com\/\" target=\"_blank\" rel=\"noopener\">Should I add a carousel<\/a> to my Hugo website? If you decide you should&hellip; this page shows you how to use a decent one.<\/p>\n<p>The carousel is based on a \n<a href=\"https:\/\/codepen.io\/joosts\/pen\/MWJBPgo\" target=\"_blank\" rel=\"noopener\">carousel with CSS scroll snap<\/a>. This carousel weighs only 3kb (uncompressed). On desktop you can interact with the arrows and the bullets, on mobile you can swipe. It kinda works without Javascript. This carousel supports native lazy loading (because it uses regular image tags instead of background images). You can put multiple carousels on one page and the carousel will &lsquo;pause&rsquo; on hover. Content is stored in a data file and design decisions are stored in the include variables.<\/p>"},{"title":"test mapje","link":"https:\/\/hugocodex.org\/branches\/test2\/branchtest\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/branches\/test2\/branchtest\/","description":{}},{"title":"Text expand","link":"https:\/\/hugocodex.org\/add-ons\/text-expand\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/text-expand\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Sometimes when you want to create a &lsquo;read more&rsquo; link, it is overkill to create a whole new page. In that case a text expand functionality, using javascript is very useful. On this website it is used for clarity and brevity.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>The script looks for an <code>[expand]<\/code> tag on a single line and then looks for the <code>[\/expand]<\/code> tag (again on a single line, thus being the only content of its paragraph). When it finds these it will add some classes and hide everything in between. It will show a &lsquo;read more \u2192&rsquo; link, indicating the text can be expanded.<\/p>"},{"title":"Vimeo shortcode","link":"https:\/\/hugocodex.org\/add-ons\/vimeo-shortcode\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/vimeo-shortcode\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Paul Irish did a nice thing. He created \n<a href=\"https:\/\/github.com\/paulirish\/lite-youtube-embed\" target=\"_blank\" rel=\"noopener\">a lighter Youtube embed<\/a>. His solution does no longer slow your website down, like normal Youtube embeds do. There is only one downside: it loads content from Youtube without consent, while Youtube is a service from a company that is known for tracking and profiling. This is not very privacy friendly. The solution is to host the poster yourself and link it to Youtube. This can be done using a shortcode. This can also be done for Vimeo.<\/p>"},{"title":"Webshop","link":"https:\/\/hugocodex.org\/add-ons\/webshop\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/webshop\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>This is a webshop with several payment methods that does not require a monthly fee. The webshop currently does not allow for variable tax calculations. It also does not provide an alternative shipping address, although that can be added easily. An email parser would allow you to automate the buying processes even further. If you are looking for something less complex, try the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/webshop-simple\/\">simpler implementation<\/a>, using Stripe instead of PayPal.<\/p>"},{"title":"Webshop (simple)","link":"https:\/\/hugocodex.org\/add-ons\/webshop-simple\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/webshop-simple\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>This is a simple webshop using Stripe that does not require a monthly fee. Great for a simple webshop. Check out the \n\n  <a href=\"https:\/\/hugocodex.org\/simple-donate\">demo<\/a>! Note that this webshop does not use a cart, or extra&rsquo;s like add-ons costs for shipping. If you are looking for these functionalities, use the \n\n      \n    \n  <a href=\"https:\/\/hugocodex.org\/add-ons\/webshop\/\">other implementation<\/a>.<\/p>\n<h3 id=\"how-it-works\">How it works<\/h3>\n<p>We leverage Stripes \n<a href=\"https:\/\/stripe.com\/en-nl\/payments\/payment-links\" target=\"_blank\" rel=\"noopener\">payment links<\/a> to do most of the heavy lifting for us. We create a payment link for every product variant in Stripe. Then, in Hugo we create the product pages and add these payment links to the associated products.<\/p>"},{"title":"Youtube shortcode","link":"https:\/\/hugocodex.org\/add-ons\/youtube-shortcode\/","pubDate":"Mon, 01 Jan 0001 00:00:00 +0000","guid":"https:\/\/hugocodex.org\/add-ons\/youtube-shortcode\/","description":"<h3 id=\"introduction\">Introduction<\/h3>\n<p>Paul Irish did a nice thing. He created \n<a href=\"https:\/\/github.com\/paulirish\/lite-youtube-embed\" target=\"_blank\" rel=\"noopener\">a lighter Youtube embed<\/a>. His solution does no longer slow your website down, like normal Youtube embeds do. There is only one downside: it loads content from Youtube without consent, while Youtube is a service from a company that is known for tracking and profiling. This is not very privacy friendly. The solution is to host the poster yourself and link it to Youtube. This can be done using a shortcode.<\/p>"}]}}