<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hugo on ads' corner</title><link>https://andreas.scherbaum.la/tags/hugo/</link><description>Recent content in Hugo on ads' corner</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 28 Jul 2025 00:00:00 +0200</lastBuildDate><atom:link href="https://andreas.scherbaum.la/tags/hugo/index.xml" rel="self" type="application/rss+xml"/><item><title>check-markdown-files: pre-commit checks for blog postings written in Markdown</title><link>https://andreas.scherbaum.la/post/2025-07-28_check-markdown-files-pre-commit-checks-for-blog-postings-written-in-markdown/</link><pubDate>Mon, 28 Jul 2025 00:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2025-07-28_check-markdown-files-pre-commit-checks-for-blog-postings-written-in-markdown/</guid><description>&lt;p&gt;I wrote a thing which helps me write better blog postings.&lt;/p&gt;&#10;&lt;p&gt;After &lt;a href="https://andreas.scherbaum.la/post/2023-11-25_new-blog"&gt;switching my blogs&lt;/a&gt; from S9Y to a static blogging engine (&lt;a href="https://gohugo.io/"&gt;goHugo&lt;/a&gt;), I found a number of preventable issues. Certain syntax errors, forgot tags, or forgot a description, or forgot a preview picture, or forgot an image. This kind of things. So I wrote &lt;a href="https://github.com/andreasscherbaum/check-markdown-files"&gt;check-markdown-files&lt;/a&gt;, which now scans all my blog postings before committing the posting to &lt;code&gt;git&lt;/code&gt;. Any known error is raised, and aborts the commit. Each problem has an override switch in case it is a false positive.&lt;/p&gt;</description></item><item><title>ERROR deprecated: site config key paginate was deprecated in Hugo v0.128.0 and subsequently removed. Use pagination.pagerSize instead.</title><link>https://andreas.scherbaum.la/post/2025-05-09_error-deprecated-site-config-key-paginate-was-deprecated-in-hugo-v0-128-0-and-subsequently-removed-use-pagination-pagersize-instead/</link><pubDate>Fri, 09 May 2025 00:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2025-05-09_error-deprecated-site-config-key-paginate-was-deprecated-in-hugo-v0-128-0-and-subsequently-removed-use-pagination-pagersize-instead/</guid><description>&lt;p&gt;While upgrading my &lt;em&gt;Arch&lt;/em&gt;/&lt;em&gt;Manjaro&lt;/em&gt; system I got &lt;em&gt;Hugo&lt;/em&gt; upgraded to version &lt;code&gt;0.128.0&lt;/code&gt; - and ran into yet another deprecated feature. This time a config option will go soon: &lt;code&gt;paginate&lt;/code&gt;, and replaced by a different option.&lt;/p&gt;&#10;&lt;p&gt;I can&amp;rsquo;t deploy the change right away, the setting is not yet supported on the LTS version on the webserver. But I can deal with it locally.&lt;/p&gt;&#10;&lt;p&gt;Te error message in question:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&#10;&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;&#10;&lt;pre tabindex="0" style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;&#10;&lt;pre tabindex="0" style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ERROR deprecated: site config key paginate was deprecated in Hugo v0.128.0 and subsequently removed. Use pagination.pagerSize instead.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;The change is easy, change the following in &lt;code&gt;config.toml&lt;/code&gt; (or whichever config format you are using). From:&lt;/p&gt;</description></item><item><title>WARN deprecated: resources.ToCSS was deprecated in Hugo v0.128.0 and will be removed in a future release. Use css.Sass instead</title><link>https://andreas.scherbaum.la/post/2025-05-08_warn-deprecated-resources-tocss-was-deprecated-in-hugo-v0-128-0-and-will-be-removed-in-a-future-release-use-css-sass-instead/</link><pubDate>Thu, 08 May 2025 00:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2025-05-08_warn-deprecated-resources-tocss-was-deprecated-in-hugo-v0-128-0-and-will-be-removed-in-a-future-release-use-css-sass-instead/</guid><description>&lt;p&gt;While upgrading my &lt;em&gt;Arch&lt;/em&gt;/&lt;em&gt;Manjaro&lt;/em&gt; system I got &lt;em&gt;Hugo&lt;/em&gt; upgraded to version &lt;code&gt;0.128.0&lt;/code&gt;. It comes with a number of new features - and of course also some deprecations. One of the features going away is &lt;code&gt;resources.ToCSS&lt;/code&gt;, or rather it is renamed. I&amp;rsquo;m using - or used - this in my code for &lt;a href="https://andreas.scherbaum.la/post/2024-05-23_client-side-comments-with-mastodon-on-a-static-hugo-website/"&gt;Mastodon comments&lt;/a&gt;.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;div style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&#10;&lt;table style="border-spacing:0;padding:0;margin:0;border:0;"&gt;&lt;tr&gt;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;"&gt;&#10;&lt;pre tabindex="0" style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;1&#10;&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;2&#10;&lt;/span&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;3&#10;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&#10;&lt;td style="vertical-align:top;padding:0;margin:0;border:0;;width:100%"&gt;&#10;&lt;pre tabindex="0" style="background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{{ $comments := resources.Get &amp;#34;css/comments.scss&amp;#34; }}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;{{ $style := $comments | resources.ToCSS | resources.Fingerprint }}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;{{ $style.Permalink }}&amp;#34; integrity=&amp;#34;{{ $style.Data.Integrity }}&amp;#34;&amp;gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&lt;p&gt;The error message coming from the deprecated &lt;code&gt;resources.ToCSS&lt;/code&gt; is:&lt;/p&gt;</description></item><item><title>ERROR deprecated: data.GetJSON was deprecated in Hugo v0.123.0 and will be removed in Hugo 0.140.0. use resources.Get or resources.GetRemote with transform.Unmarshal</title><link>https://andreas.scherbaum.la/post/2025-03-20_error-deprecated-data-getjson-was-deprecated-in-hugo-v0-123-0-and-will-be-removed-in-hugo-0-140-0-use-resources-get-or-resources-getremote-with-transform-unmarshal/</link><pubDate>Thu, 20 Mar 2025 00:00:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2025-03-20_error-deprecated-data-getjson-was-deprecated-in-hugo-v0-123-0-and-will-be-removed-in-hugo-0-140-0-use-resources-get-or-resources-getremote-with-transform-unmarshal/</guid><description>&lt;p&gt;Every &lt;em&gt;goHugo&lt;/em&gt; update brings new surprises, most daring are the deprecated features which are now removed. This time I ran into the deprecated &lt;code&gt;data.GetJSON&lt;/code&gt; feature which was removed.&lt;/p&gt;&#10;&lt;p&gt;Occasionally removing features breaks my blogging workflow: my laptop is a rolling distribution, and keeps software mostly up to date. This means I have the latest and greatest running. The webserver however is running on LTS, which is lagging a bit behind in terms of software versions. What is working on the webserver is no longer working on my laptop. Worst case, the fix for the deprecated feature is not even working on the LTS version. But that&amp;rsquo;s life.&lt;/p&gt;</description></item><item><title>Hugo Blog: Find postings without comment id</title><link>https://andreas.scherbaum.la/post/2024-09-04_hugo-blog-find-postings-without-comment-id/</link><pubDate>Wed, 04 Sep 2024 00:00:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2024-09-04_hugo-blog-find-postings-without-comment-id/</guid><description>&lt;p&gt;In a previous blog posting I explained hwo to add comments using your &lt;em&gt;Mastodon&lt;/em&gt; account. It so happens that I occasionally forget to add the origin &lt;em&gt;Mastodon&lt;/em&gt; comment ID to the posting. So I wrote a script, and a cron job &amp;hellip;&lt;/p&gt;</description></item><item><title>Client-side comments with Mastodon on a static Hugo website</title><link>https://andreas.scherbaum.la/post/2024-05-23_client-side-comments-with-mastodon-on-a-static-hugo-website/</link><pubDate>Thu, 23 May 2024 13:11:27 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2024-05-23_client-side-comments-with-mastodon-on-a-static-hugo-website/</guid><description>&lt;p&gt;Ever since I &lt;a href="https://andreas.scherbaum.la/post/2023-11-25_new-blog/"&gt;moved this blog&lt;/a&gt; to &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; from &lt;a href="https://s9y.org/"&gt;Serendipity&lt;/a&gt;, I missing the comment option a bit. This is something which a static blogging engine does not offer out of the box. And I did not migrate all the comments from my old blog to my new blog.&lt;/p&gt;&#10;&lt;p&gt;Inspired by a couple of postings which integrate &lt;em&gt;Mastodon&lt;/em&gt; as &amp;ldquo;comments&amp;rdquo; into static blogs, I set out to add this to my own blog.&lt;/p&gt;</description></item><item><title>Blockquotes in Hugo</title><link>https://andreas.scherbaum.la/post/2024-03-01_blockquotes-in-hugo/</link><pubDate>Fri, 01 Mar 2024 00:48:24 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2024-03-01_blockquotes-in-hugo/</guid><description>&lt;p&gt;&lt;em&gt;Hugo&lt;/em&gt; uses &lt;a href="https://en.wikipedia.org/wiki/Markdown"&gt;Markdown&lt;/a&gt; to create the content, which is then parsed into &lt;a href="https://en.wikipedia.org/wiki/HTML"&gt;static HTML&lt;/a&gt;. One of the features of &lt;em&gt;Markdown&lt;/em&gt; are quotes, like the following:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Never regret anything that made you smile. — Mark Twain&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;The above quote is a single line quote. Multiline quotes (block quotes) are possible, but they are not very intuitive.&lt;/p&gt;</description></item><item><title>How to integrate YouTube videos into Hugo blog postings</title><link>https://andreas.scherbaum.la/post/2024-02-09_how-to-integrate-youtube-videos-into-hugo-blog-postings/</link><pubDate>Fri, 09 Feb 2024 21:52:05 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2024-02-09_how-to-integrate-youtube-videos-into-hugo-blog-postings/</guid><description>&lt;p&gt;Sometimes you want to integrate a &lt;em&gt;YouTube&lt;/em&gt; video into your blog posting. There are several ways how to do this in &lt;em&gt;Hugo&lt;/em&gt;.&lt;/p&gt;</description></item><item><title>New Blog</title><link>https://andreas.scherbaum.la/post/2023-11-25_new-blog/</link><pubDate>Fri, 24 Nov 2023 19:17:35 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2023-11-25_new-blog/</guid><description>&lt;p&gt;New blog. Or, more exactly, new blog software.&lt;/p&gt;&#10;&lt;p&gt;I moved this blog from &lt;a href="https://en.wikipedia.org/wiki/Serendipity_(software)"&gt;Serendipity&lt;/a&gt; to &lt;a href="https://en.wikipedia.org/wiki/Hugo_(software)"&gt;Hugo&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Dynamic content in static websites in Hugo</title><link>https://andreas.scherbaum.la/post/2023-03-02_dynamic-content-in-static-websites-in-hugo/</link><pubDate>Thu, 02 Mar 2023 18:21:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2023-03-02_dynamic-content-in-static-websites-in-hugo/</guid><description>&lt;p&gt;With people &lt;a href="https://andreas.scherbaum.la/post/2022-11-21_migration-from-twitter-to-mastodon/"&gt;moving away from &lt;em&gt;Twitter&lt;/em&gt;&lt;/a&gt;, mostly to &lt;em&gt;&lt;a href="https://joinmastodon.org/"&gt;Mastodon&lt;/a&gt;&lt;/em&gt;, discovering the new accounts became a problem.&lt;/p&gt;&#10;&lt;p&gt;For people in the &lt;em&gt;PostgreSQL&lt;/em&gt; community I created a &lt;a href="https://postgresql.life/social/"&gt;website&lt;/a&gt; which lists different social media accounts. This website is part of the &amp;ldquo;&lt;a href="https://postgresql.life/"&gt;PostgreSQL Person of the Week&lt;/a&gt;&amp;rdquo; interview project, however the data source is dynamic, and stored in a different repository. This allows me to keep the repository for the website private, but publish the data for the social media links - this data is public anyway. The interview repository is private, because who wants to see upcoming interviews anyway? ;-)&lt;/p&gt;</description></item><item><title>Hugo: Count entries in Taxonomy</title><link>https://andreas.scherbaum.la/post/2022-06-08_hugo-count-entries-in-taxonomy/</link><pubDate>Wed, 08 Jun 2022 18:49:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2022-06-08_hugo-count-entries-in-taxonomy/</guid><description>&lt;p&gt;For the &amp;ldquo;&lt;a href="https://postgresql.life/"&gt;PostgreSQL Person of the Week&lt;/a&gt;&amp;rdquo; interviews I&amp;rsquo;m using &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; as &lt;a href="https://en.wikipedia.org/wiki/Static_web_page"&gt;static&lt;/a&gt; blogging engine. Part of every interview is the list of &lt;a href="https://postgresql.life/tags/"&gt;tags&lt;/a&gt;, which links this interview to other similar interviews. However until recently no one really knew if a tag is popular or just used in this interview. I wanted to change this, and add the tag count behind every tag.&lt;/p&gt;</description></item><item><title>Avoid linebreaks in Hugo shortcodes</title><link>https://andreas.scherbaum.la/post/2021-07-16_avoid-linebreaks-in-hugo-shortcodes/</link><pubDate>Fri, 16 Jul 2021 00:10:00 +0200</pubDate><guid>https://andreas.scherbaum.la/post/2021-07-16_avoid-linebreaks-in-hugo-shortcodes/</guid><description>&lt;p&gt;Shortcodes in &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; are a neat and poweful system to avoid repating the same piece of text over and over again. Let&amp;rsquo;s say I have the following text:&lt;/p&gt;</description></item><item><title>Public previews in Hugo</title><link>https://andreas.scherbaum.la/post/2020-03-14_public-previews-in-hugo/</link><pubDate>Sat, 14 Mar 2020 16:44:00 +0100</pubDate><guid>https://andreas.scherbaum.la/post/2020-03-14_public-previews-in-hugo/</guid><description>&lt;p&gt;&lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt; is a static templating system. It is (mainly) used to deploy websites/blogs which don&amp;rsquo;t have and need dynamic content. The content of all pages is pre-generated, and the webserver delivers files from disk (or rather from cache, once files are loaded into memory). This approach allows for extremely fast websites, as no dynamic content is generated on every request.&lt;/p&gt;&#10;&lt;p&gt;While I know &lt;em&gt;Hugo&lt;/em&gt; &lt;a href="https://engineering.pivotal.io/"&gt;from work&lt;/a&gt;, I haven&amp;rsquo;t really used it for private projects - until recently. I have started a new project where I present &lt;a href="https://postgresql.life/"&gt;interviews with people&lt;/a&gt; behind the &lt;a href="https://www.postgresql.org/"&gt;PostgreSQL Project&lt;/a&gt; - and this is perfect for a static website. Interviews don&amp;rsquo;t change, once published.&lt;/p&gt;</description></item></channel></rss>