<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/rss.xsl" type="text/xsl"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>computer languages/markup/HTML/5 on Ben Goldsworthy</title>
    <link>https://bengoldsworthy.net/skills/computer-languages/markup/html/5/</link>
    <description>Recent content in computer languages/markup/HTML/5 on Ben Goldsworthy</description>
    <category>skills</category>
    <language>en-gb</language>
    <managingEditor>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</managingEditor>
    <webMaster>admin&#43;bg@bengoldsworthy.net (Ben Goldsworthy)</webMaster>
    <copyright>CC0</copyright>
    <lastBuildDate>Sun, 08 Jun 2025 23:19:00 +0200</lastBuildDate><atom:link href="https://bengoldsworthy.net/skills/computer-languages/markup/html/5/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Diet &lt;code&gt;bengoldsworthy.net&lt;/code&gt;</title>
      <link>https://bengoldsworthy.net/blog/posts/diet-bengoldsworthy.net/</link>
      <category>Projects</category>
      <pubDate>Sun, 08 Jun 2025 23:19:00 +0200</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/blog/posts/diet-bengoldsworthy.net/</guid>
      <description>In migrating my site to Hugo, I&amp;rsquo;ve put a lot of work into trimming it down and making its various resources more efficient.</description>
      <content:encoded><![CDATA[<p><a href="/blog/posts/baking-bengoldsworthy.net/">Way back in 2023</a>, I talked about my long-, long-, <em>long</em>-awaited site migration to <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite>: a static site generator&nbsp;(<abbr>SSG</abbr>).</p>
<p>Beyond a certain ideological motivation to do so, I also talked about how I wanted to make my site more lightweight. Now, two long years later, I have finally managed to finish this part of the work, which gives me the chance to start making some comparisons and quantify the changes.</p>
<h2 id="the-old-way" class="subheading">
  The Old Way
  <a class="heading-anchor" href="#the-old-way">¶</a>
</h2>
<p>My old site ran on WordPress. Using WordPress, every file you upload is added to a Media Library that is shared across the site. In addition, any image files you upload are automatically duplicated in <a href="https://wordpress.com/go/tutorials/controlling-wordpress-image-sizes/#how-to-use-the-default-image-sizes-in-wordpress">various different sizes</a>. So, for example, if I upload a file (<code>hobbit-1.jpg</code> in this case) I end up with the following files:</p>



<div class="picture__wrapper" role="group">
  <div class="picture__wrapper-visual">



<picture class="picture" itemprop="image" >
  

<source srcset="/blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_920b3a8ef1881b3.avif, /blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_947985dafa221c9c.avif 800w, /blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_d16d4a1f73b978df.avif 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>


<source srcset="/blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_3ad8ca2f00529bb9.webp, /blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_2d54efedf81381ce.webp 800w, /blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_e556ce8a2b77d5b.webp 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>
<img class="u-photo picture__image"  src="/blog/posts/diet-bengoldsworthy.net/images/resized-files_hu_d6fa23e06bdf6139.png"  width="825"  height="264"  alt="Five copies of the same files, ranging from full-size (225 KiB) down to 150×150 (9.4 KiB)"  loading="lazy" />
</picture>




<p class="attr">Screenshot by the author</p>
</div></div>

<p>As you can see, the combined size of all the resized images (324.2 <abbr
          class="abbr"
          title="kibibytes">KiB</abbr>) can, and often does, end up larger than the original file (255 <abbr
          class="abbr"
          title="kibibytes">KiB</abbr>) &mdash; all for files that might never be needed.</p>
<p>Of course, the cost of storage these days is effectively negligible, so this is by no means an unreasonable compromise to make in favour of having very small files available pre-processed for display when necessary.</p>
<p>Having a central Media Library (which stores all uploaded files in a single <code>wp-content/uploads/&lt;year-uploaded&gt;/&lt;month-uploaded&gt;/</code> directory structure) also represents a trade-off in terms of whether media items are treated as objects that can be linked to from multiple posts, or whether they are bundled up with the post content itself (which in WordPress is saved as text fields within a database). For a site like mine, however, there are very few instances of media files that I want to refer to from multiple places, and generally I prefer the organisation of each post into a single discrete bundle with all of its resources (even through this does, in those rare cases, mean I will be duplicating those files for each post that needs them<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup>).</p>
<h2 id="hugo" class="subheading">
  Hugo
  <a class="heading-anchor" href="#hugo">¶</a>
</h2>
<p>Hugo works differently, by virtue of its being an <abbr
          class="abbr"
          title="static site generator">SSG</abbr>. Whereas in WordPress you upload all the bits of a post separately so they can be combined dynamically (<abbr
          class="abbr"
          title="id est [that is]" lang="la">i.e.</abbr>&thinsp;, fried) when a visitor requests a page, in Hugo you have a separation between your raw materials and the resulting site files, which you generate all in one go during the build step and then upload for a visitor to access.</p>
<p>Central to this in Hugo is the concept of a <a href="https://gohugo.io/content-management/organization/#page-bundles">page bundle</a>: a directory containing the article content (in a Markdown file) and any <a href="https://gohugo.io/content-management/page-resources/">page resources</a>. By putting those resources in the page bundle, you can also reference them in your article&rsquo;s metadata and add any <a href="https://gohugo.io/content-management/page-resources/#metadata">additional information</a>, such as credits or alt text. This was another reason for wanting to reorganise my content, because I wanted to both a) include attribution and licensing information for all the media I&rsquo;ve used over the years and b) add alt text for accessibility reasons.</p>
<h2 id="a-long-job" class="subheading">
  A Long Job
  <a class="heading-anchor" href="#a-long-job">¶</a>
</h2>
<p>I migrated my site in August 2022, so this is where my WordPress Media Library directory finishes. However, I&rsquo;ve been at this blogging game for a long while, and that left me with just over 6,000 files (1.5 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>) to reorganise; even discounting the various resized duplicates mentioned above, that&rsquo;s still ~1,200 individual files.</p>
<p>If I was only moving the files into new directories, I likely could have automated the process, but because I was also identifying sources and adding text descriptions for everything, there was always going to be a manual element; and a manual element means a lot of time. So, over the past few years (in fits and starts; it certainly wasn&rsquo;t a constant effort) I&rsquo;ve been chipping away, a section of the site at a time.</p>
<p>Most of this has been very monotonous, but I could always put on a film or podcast or just zen out to some music and crack on. Also, tracking down some of the sources and licensing information for random images I picked up online over a decade ago was interesting, and going through the <a href="/cv/organisations/"><abbr
          class="abbr"
          title="curriculum vitae">CV</abbr></a> section let me check in on what&rsquo;s happened to my past organisations, through mergers, acquisitions and bankruptcies.</p>
<p>But now, I&rsquo;ve finally finished and deleted my old <code>wp-content/uploads/</code> directory. So let&rsquo;s crunch some numbers.</p>
<h2 id="numbers" class="subheading">
  Numbers
  <a class="heading-anchor" href="#numbers">¶</a>
</h2>
<p>As mentioned, my WordPress Media Library at time of migration came to 6,043 files (1.5 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>).</p>
<p>Also as mentioned, the <abbr
          class="abbr"
          title="static site generator">SSG</abbr> approach means I effectively now have two distinct collections of media to compare: the raw material contained in the page bundles of the site source files; and the resulting Web site files generated for upload to my server.</p>
<p>My comparisons are not necessarily going to be 100% accurate, because several years have passed during this project and I have continued to add new content (and, thus, resources) to the site. I can roughly compare the size of the same media by limiting the new site&rsquo;s content to those posts up to July 2022, but this is slightly muddied by the fact that I have also gone back and added additional media files to old posts, particularly those in the <a href="/cv/appearances/">Appearances</a> and <a href="/portfolio/">Portfolio</a> sections. These files (usually mirroring things like software applications, videos or audio files uploaded elsewhere) are generally much larger than image files.</p>
<p>So, for my site material, and limiting myself to posts predating July 2022, the new size of my combined resources is… 1.6 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>, or 1,281 files. BUT, 149 of those files are things other than images which, despite the small number, account for 1 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr> of the total. So looking at only images, I&rsquo;ve reduced the Media Library from 1.5 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr> to around 0.55 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>; a reduction by roughly two thirds.</p>
<p>That&rsquo;s the files on my disk shrunk; how about the resulting files on my server (where storage is slightly more costly)?</p>
<p>Well, applying the same search parameters to the resulting output files, I get a total of 2,945 files (again, 1.6 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>), of which 154 are non-images (accounting for 1 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>), leaving 0.55 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr> for the image files. So pretty much identical.</p>
<p>But this has certainly been a lot of faff just to save small amounts of storage which, as mentioned, is basically a free resource. So we come to the  third and final part of the equation: just how heavy these files are as they are sent over the wires to my dear reader(s)?</p>
<p>You may have noticed that the <em>number</em> of files almost doubled in the rendered output, without no perceptible bump in the overall filesize. And here we can see the starkest improvement. In my page templates, I have <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/src/branch/main/layouts/partials/media/picture.html">a partial for rendering images</a> that uses the <code>&lt;picture&gt;</code> element rather than the more basic <code>&lt;img&gt;</code>. The <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture"><code>&lt;picture&gt;</code> element</a> takes a series of <code>&lt;source&gt;</code> elements, with links to various different files and the conditions under which to choose them, and will attempt to show the best option for any user based on the size of their browser window, the file types their browser supports, <abbr
          class="abbr"
          title="Et Cetera [and so forth]" lang="la">etc.</abbr>&thinsp; (and it also includes a simple <code>&lt;img&gt;</code> as a fallback for those browsers that don&rsquo;t support <code>&lt;picture&gt;</code>).</p>
<p>Within the template, I also resize each image file to widths of 1,200 and 800 <abbr
          class="abbr"
          title="pixels">px</abbr>, alongside (most impactfully) <a href="https://gohugo.io/content-management/image-processing/#target-format">converting it to WebP format</a>. WebP is a Web-optimised image format that can produce some astonishing compression with no discernible impact on image quality (when viewed on a device).<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> For example, one of these images is raw and one is WebP-compressed, but I doubt you can tell which is which:</p>
<!-- TODO: Partial decorator for figure -->
<figure class="article__figure figure" role="group">
  
  
  
  <div class="picture__wrapper" role="group">
    <div class="picture__wrapper-visual">
  
  
  
  <picture class="picture" itemprop="image" >
    <img class="u-photo picture__image"  src="/blog/posts/diet-bengoldsworthy.net/images/test_card_f_hu_6af8f1c1c41ff362.png"  width="767"  height="561"  alt="BBC test card F, showing a girl and a clown doll"  loading="lazy" />
  </picture>
  
  
  
  
  <p class="attr"><a href="https://archive-downloader.bbcrewind.co.uk/remarc/1960_TV%26Radio_TVTestCardFA" target="_blank" rel="noopener">BBC</a> (<a href="https://sound-effects.bbcrewind.co.uk/licensing" target="_blank" rel="noopener">BBC RemArc Licence</a>)</p>
  </div></div>

  
  
  
  <div class="picture__wrapper" role="group">
    <div class="picture__wrapper-visual">
  
  
  
  <picture class="picture" itemprop="image" >
    
  
  <source srcset="/blog/posts/diet-bengoldsworthy.net/images/test_card_f_hu_6bc15aa14eddd628.webp, /blog/posts/diet-bengoldsworthy.net/images/test_card_f_hu_27f91adcb0ad1a7.webp 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>
  <img class="u-photo picture__image"  src="/blog/posts/diet-bengoldsworthy.net/images/test_card_f_hu_6e8b6ff448cec638.webp"  width="767"  height="561"  alt="BBC test card F, showing a girl and a clown doll"  loading="lazy" />
  </picture>
  
  
  
  
  <p class="attr"><a href="https://archive-downloader.bbcrewind.co.uk/remarc/1960_TV%26Radio_TVTestCardFA" target="_blank" rel="noopener">BBC</a> (<a href="https://sound-effects.bbcrewind.co.uk/licensing" target="_blank" rel="noopener">BBC RemArc Licence</a>)</p>
  </div></div>

  <figcaption class="figure__caption"><p class="figcaption__caption">Answer: The first image is the raw <abbr
          class="abbr"
          title="Portable Network Graphics">PNG</abbr> (385.74&nbsp;<abbr
          class="abbr"
          title="kibibytes">KiB</abbr>); the second is the converted WebP (36.17&nbsp;<abbr
          class="abbr"
          title="kibibytes">KiB</abbr>).</p></figcaption>
</figure>
<p>Along with this automated resizing and format conversion, I also replaced many images with <abbr
          class="abbr"
          title="Scalable Vector Graphics">SVG</abbr> equivalents; in effect, this means replacing an image file with a small piece of code that describes how to produce the same image, which requires basically no space at all (but which is, of course, mostly limited to geometic shapes). One post that particularly benefitted from this was <a href="/blog/posts/most-lgbt-flags-ranked/">this flag-heavy post</a>: the raw files were 77.5 <abbr
          class="abbr"
          title="kibibytes">KiB</abbr>, whilst the <abbr
          class="abbr"
          title="Scalable Vector Graphics">SVG</abbr> equivalents are only 13.7 <abbr
          class="abbr"
          title="kibibytes">KiB</abbr> (with the added bonus of being able to effortlessly render at any size with the same quality, even if someone, for some reason, decided to project that post onto the side of a building).</p>
<p>So of my 2,945 produced image files:</p>
<ul>
<li>1,696 are WebPs, <abbr
          class="abbr"
          title="Scalable Vector Graphics">SVGs</abbr> and <abbr
          class="abbr"
          title="AV1 Image File Format">AVIFs</abbr>, for a grand total of 92 <abbr
          class="abbr"
          title="mibibytes">MiB</abbr> in size;</li>
<li>the remaining 1,189 are <abbr
          class="abbr"
          title="Joint Photographic Experts Group">JPEGs</abbr> and <abbr
          class="abbr"
          title="Portable Network Graphics">PNGs</abbr>, which account for the other 497 <abbr
          class="abbr"
          title="mibibytes">MiB</abbr>.</li>
</ul>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="resource-file-sizes"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">Comparison of file sizes (prior to Jul 2022 only)</h4></figcaption></figure>

<h2 id="what-could-have-been" class="subheading">
  What Could Have Been
  <a class="heading-anchor" href="#what-could-have-been">¶</a>
</h2>
<p>So, evidently, this approach has drastically reduced both my local and remote storage requirements and my network efficiency for all my pre-migration posts. But as a speculative case, how much do I think has been saved by having made this migration in the first place?</p>
<p>Well, taking into account <em>all</em> of the various posts on this site as of today, I have around 2,086 media files (3.7 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>) in my raw material and output 3,993 files (3.4 <abbr
          class="abbr"
          title="gibibytes">GiB</abbr>) in my generated site content. Compared to the WordPress site, my Hugo site has one fifth as many image files in its source material and half in its output, and around half of the file size, respectively.</p>
<p>Converting those reductions into multipliers, then, gives us the following:</p>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="predicted-file-sizes"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">Comparison of resource size for all site content, including prediction of equivalent WordPress resource size</h4></figcaption></figure>

<h2 id="licensing" class="subheading">
  Licensing
  <a class="heading-anchor" href="#licensing">¶</a>
</h2>
<p>Lastly, I mentioned that one of my parallel goals was to add any missing licensing information to the media I&rsquo;ve used over the years. Having now done so, I can review the different licenses used across the site:</p>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="licences"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">Resource licence share</h4></figcaption></figure>

<h2 id="addendum-adding-avif-support" class="subheading">
  Addendum: Adding AVIF Support
  <a class="heading-anchor" href="#addendum-adding-avif-support">¶</a>
</h2>
<p>Hugo finally <a href="https://github.com/gohugoio/hugo/releases/tag/v0.162.0">added <abbr
          class="abbr"
          title="AV1 Image File Format">AVIF</abbr> support</a>, so I wasted little time in implementing it. Since I wrote this post, I have also rendered additional 500 <abbr
          class="abbr"
          title="pixels">px</abbr>-wide versions of every image.</p>
<p>First, I realised that I had actually <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/commit/edba5d203e3fd01f9a73d20c19c64b29abb7df92#diff-12c825e6bb7aa942b4adc779c6043e76163383cd">broken the fallback raw image almost a year ago</a>, meaning that any device that lacked WebP support would have been unable to view any of my images; oops.</p>
<p>Adding the generation step was <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/commit/5f4e85cf3ef16608640ff04160e83dc42f62e00b">pretty simple</a>, and I took the time to tidy my partial for the WebP generation too.</p>
<p>The end result for my site output:</p>
<ul>
<li>5,388 WebP (491 <abbr
          class="abbr"
          title="megabytes">MB</abbr>) and 4,920 <abbr
          class="abbr"
          title="AV1 Image File Format">AVIF</abbr> files (416 <abbr
          class="abbr"
          title="megabytes">MB</abbr>);</li>
<li>1,178 <abbr
          class="abbr"
          title="Portable Network Graphics">PNG</abbr> (253 <abbr
          class="abbr"
          title="megabytes">MB</abbr>) and 1,719 <abbr
          class="abbr"
          title="Joint Photographic Experts Group">JPEG</abbr> files (849 <abbr
          class="abbr"
          title="megabytes">MB</abbr>); and</li>
<li>139 <abbr
          class="abbr"
          title="Scalable Vector Graphics">SVG</abbr> (12 <abbr
          class="abbr"
          title="megabytes">MB</abbr>) and 8 <abbr
          class="abbr"
          title="Graphics Interchange Format">GIF</abbr> files (1.1 <abbr
          class="abbr"
          title="megabytes">MB</abbr>).</li>
</ul>
<p>Or, in other words, I now produce:</p>
<ul>
<li>10,308 Web-optimised files with a combined file size of 907 <abbr
          class="abbr"
          title="megabytes">MB</abbr>;</li>
<li>2,897 non-optimised files, with a combined file size of 1,102 <abbr
          class="abbr"
          title="megabytes">MB</abbr>; and</li>
<li>147 vector image files with a combined file size of 13.1 <abbr
          class="abbr"
          title="megabytes">MB</abbr>.</li>
</ul>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Actually, if you were desparate to avoid any duplication, you can put multi-use resources in a <a href="https://gohugo.io/hugo-pipes/introduction/#asset-directory">global <code>assets/</code> directory</a>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p><abbr
          class="abbr"
          title="AV1 Image File Format">AVIF</abbr> is a similar Web-optimised format, and if Hugo ever adds the conversion I will add that to my templates. Update 2026-06-29: See the <a href="#addendum-adding-avif-support">new addendum</a>.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded>
    </item>
    
    <item>
      <title>Baking bengoldsworthy.net</title>
      <link>https://bengoldsworthy.net/blog/posts/baking-bengoldsworthy.net/</link>
      <category>Projects</category>
      <pubDate>Thu, 11 May 2023 20:11:00 -0400</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/blog/posts/baking-bengoldsworthy.net/</guid>
      <description>I&amp;rsquo;ve finally moved my site off of WordPress and onto a static site, as well as a VPS. In this post I give my reasons for doing so and provide a tour of the new site.</description>
      <content:encoded><![CDATA[<blockquote>
<p>Why bake your pages instead of frying? Well, as you might guess, it’s healthier, but at the expense of not tasting quite as good.</p>
<footer>Aaron Swartz, <cite class="cite" itemtype="BlogPosting" cite="http://www.aaronsw.com/weblog/000404">Bake Don't Fry</cite></footer>
</blockquote>
$$
\newcommand{\BibTeX}{\textsc{B\kern-0.1emi\kern-0.017emb}\kern-0.15em\TeX}
$$<p>At long last, I&rsquo;ve fulfilled a personal dream of moving my site off of <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> and onto a static site, as well as hosting on a <abbr
          class="abbr"
          title="virtual private server">VPS</abbr>. This has been a <em>long</em> time coming, so in this post I&rsquo;ll detail the whys, the hows, the trials and tribulations, along with continuing my tradition of providing a new tour around the site each time I complete a major overhaul.</p>
<p>It should go without saying that this article will present the process in a much more neatly chronological order than is necessarily accurate: as this site is a part-time passion project, and I&rsquo;ve been embroiled in some heavy-duty travelling, the reality was far more chaotic and piecemeal for much of the site&rsquo;s development, with a lot more back-and-forth between the various stages (e.g., things I learnt about <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite> templating would influence my attempts to clean up my site content, which would in turn require alterations in the templating).</p>
<h2 id="the-seed-is-planted" class="subheading">
  The Seed is Planted
  <a class="heading-anchor" href="#the-seed-is-planted">¶</a>
</h2>
<p>Ever since reading the late Aaron Swartz&rsquo; <a href="http://www.aaronsw.com/weblog/000404"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/BlogPosting"><meta itemprop="url" content="http://www.aaronsw.com/weblog/000404"><span itemprop="name">Bake, Don’t Fry</span></cite></a> back in early 2018, I&rsquo;ve been keen to put his advice into practice.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> Swartz presented various valid advantages to serving a Web site as static files, such as ease of transfer between different hosting options and the creation of backups, as well as the ability to bulk search and modify my site content using the existing <abbr
          class="abbr"
          title="GNU&#39;s Not Unix">GNU</abbr> utils like <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://www.gnu.org/software/grep/"><span itemprop="name">grep</span></cite>. However, unlike in 2002 when the post was written, we now live in the midst of the <a href="https://idlewords.com/talks/website_obesity.htm"><q>Website Obesity Crisis</q></a> (or, in more colourful terms, the era of the <a href="https://pxlnv.com/blog/bullshit-web/"><q>bullshit Web</q></a>), and concerns about site bloat, performance and tracking, as well as data siloisation and platform sovereignty, that were only beginning to appear on the radar at the time of his writing now present the key battlegrounds when it comes to securing the future of a Web worth having. Within this environment, the additional opportunites provided by a self-hosted static site have never been more crucial.</p>
<p>First, though, let&rsquo;s look at the history of my Web presence. In all of its many guises, my site has been served dynamically; the original <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><span itemprop="name">OhWhatOhJeez</span></cite> site comprised hand-written PHP page templates, and every subsequent iteration has been running on <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite>. This has been quite beneficial to me, as there remains a huge contracting market for someone with <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> site administration experience (and having done Theme and Plugin development makes me look even shinier, even if all someone wants from me is to update a bunch of Plugins). That said, around the same time I was toying with the idea of shifting to a statically-generated site, <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> introduced its <a href="https://wordpress.org/plugins/gutenberg/">post block editor <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.org/plugins/gutenberg/"><span itemprop="name">Gutenberg</span></cite></a> as the default editor. This was <a href="https://wordpress.org/support/plugin/gutenberg/reviews/">not a popular move</a>, and whilst there <em>is</em> a <a href="https://wordpress.org/plugins/classic-editor/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.org/plugins/classic-editor/"><span itemprop="name">Classic Editor</span></cite></a> Plugin available, this was a stark lesson in the dangers of relying on a technology stack whose development direction is headed in a questionable direction.  In 2021, <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.org/plugins/gutenberg/"><span itemprop="name">Gutenberg</span></cite> was extended to provide full site editing, and I can say from experience that it is one of the most miserable Web experiences I have ever had.</p>
<h2 id="planning" class="subheading">
  Planning
  <a class="heading-anchor" href="#planning">¶</a>
</h2>
<p>I have always used this site as a playground to explore new technologies and approaches, and to improve my own skills as a developer. Despite the low stakes for the site, I always endeavour to make sure that this site is as standards-compliant as possible; whilst I&rsquo;ve never met a professional role that cared about my encylopedic knowledge of <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr>5&rsquo;s semantic elements, you can look at the markup for this site to see my comprehensive use of <code>&lt;section&gt;</code>s, headers and suchlike.</p>
<p>I knew that, as part of the site redesign, I wanted to play around with several things:</p>
<ul>
<li>achieving <a href="https://www.w3.org/TR/WCAG21/#cc1"><abbr
          class="abbr"
          title="Web Content Accessibility Guidelines">WCAG</abbr> 2.1 AAA accessibility conformance</a> (and cocking an eye towards what&rsquo;s coming out of the <a href="https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/"><abbr
          class="abbr"
          title="W3C Accessibility Guidelines">WCAG</abbr> 3</a> writing process, though that&rsquo;s still very early days yet);</li>
<li><a href="https://en.wikipedia.org/wiki/Semantic_Web">semantic Web</a> mark-up using <a href="https://schema.org/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://schema.org/"><span itemprop="name">Schema.org</span></cite></a>;</li>
<li>asset processing pipelines, allowing me to automatically generate efficient, Web-suitable media given a variety of input sources;</li>
<li>more maintainable stylesheets (e.g., no more <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/important"><code>!important!</code> flags</a> everywhere!);</li>
<li>automated code and mark-up formatting and linting wherever possible;</li>
<li>manual <a href="https://validator.w3.org/feed/docs/atom.html">Atom feed</a> design (as <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> automatically generates an <abbr
          class="abbr"
          title="Really Simple Syndication">RSS</abbr> feed for all sites, so I&rsquo;ve never had to actually get down and dirty with the standard);</li>
<li>doing away with pagination, whilst using lazy loading and other tricks to still keep things lightweight;</li>
<li>minimising, or ideally entirely doing away with, third-party-hosted content such as Javascript;</li>
<li>IndieWeb tooling, such as <a href="https://www.w3.org/TR/webmention/">Webmention</a> implementation and a proper <a href="https://indieweb.org/POSSE"><abbr
          class="abbr"
          title="Publish (on your) Own Site, Syndicate Elsewhere">POSSE</abbr></a> workflow, and benchmarking my <a href="https://indieweb.org/IndieMark">IndieMark level</a>; and</li>
<li>as a stretch goal, porting the site to non-Web Internet protocols such as <a href="https://gemini.circumlunar.space/">Gemini</a>.</li>
</ul>
<p>Lastly, along with shifting my site to a new platform I also wanted to switch from managed Web hosting to a <abbr
          class="abbr"
          title="virtual private server">VPS</abbr>, which would also allow me to set up additional services on subdomains as part of a wider plan to move my data out of third-party silos and into systems which I control. To begin with, I knew that I wanted to move my code off of <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://github.com"><span itemprop="name">GitHub</span></cite> (with <a href="https://www.fsf.org/blogs/licensing/fsf-funded-call-for-white-papers-on-philosophical-and-legal-questions-around-copilot">increasing urgency</a>) and my media cataloguing out of the assortment of social cataloguing sites I&rsquo;ve been using for around a decade (e.g., Amazon-owned <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://goodreads.com"><span itemprop="name">Goodreads</span></cite>, which recently also helped confirm my decision by forcing through a shitty redesign).</p>
<p>So, with some free time on my hands, I finally decided to start working on it. I initially thought I wanted to build my own static site generator following the Unix philosophy and using a bunch of <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://www.gnu.org/software/bash/"><span itemprop="name">bash</span></cite> scripts chained together, but before long I decided I&rsquo;d never get this done if I insisted on reinventing the wheel (no mattter how much of a good learning experience it might have been) and instead went for an established static site generator. It seemed like the frontrunners in the field were <a href="https://gohugo.io"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite></a> and <a href="https://jekyllrb.com/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://jekyllrb.com/"><span itemprop="name">Jekyll</span></cite></a>, with the former written in Go and banking on generation speed and the latter offering easier templating. I wanted to play around with a new templating language, had heard a lot about Go and felt like <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite> would be the more valuable tool to learn. Also, <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite>&rsquo;s content-agnosticism seemed potentially more versatile than a more specifically blogging-focussed alternative like <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://jekyllrb.com"><span itemprop="name">Jekyll</span></cite>, which would be necessary for my blog-cum-portfolio-cum-CV monstrosity.</p>
<h2 id="migrating-from-wordpress" class="subheading">
  Migrating from WordPress
  <a class="heading-anchor" href="#migrating-from-wordpress">¶</a>
</h2>
<p>First, I had to figure out how to export and convert all of my <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> site content to the appropriate format for <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite>. This was no small order, as my <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> site consisted of:</p>
<ul>
<li>the default <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> Post Types and Taxonomies, comprising:
<ul>
<li>158 Posts;</li>
<li>14 Pages;</li>
<li>79 Comments;</li>
<li>25 Categories; and</li>
<li>546 Tags.</li>
</ul>
</li>
<li>10 custom Post Types, comprising:
<ul>
<li>16 Web sites;</li>
<li>37 software programs;</li>
<li>10 audiovisual productions;</li>
<li>204 externally-published writings;</li>
<li>14 miscellaneous portfolio items.</li>
<li>200 roles;</li>
<li>42 qualifications;</li>
<li>29 awards;</li>
<li>29 media appearances; and</li>
<li>83 online comments.</li>
</ul>
</li>
<li>6 custom Taxonomies, comprising:
<ul>
<li>385 organisations;</li>
<li>19 SOCs;</li>
<li>66 locations;</li>
<li>96 people;</li>
<li>19 private collaborators; and</li>
<li>46 skills.</li>
</ul>
</li>
<li>a Media Library of 1,421 items;</li>
<li>10 Plugins.</li>
</ul>
<p>This all resulted in a <code>wp-content/</code> folder of 1.4 <abbr
          class="abbr"
          title="gigabytes">GB</abbr>, and a <code>wp-content/uploads/</code> folder alone of 749.9 <abbr
          class="abbr"
          title="megabytes">MB</abbr>. <em>Ooft</em>.</p>
<p>The <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite> docs provide <a href="https://gohugo.io/tools/migrations#wordpress">several tools for migrating data from <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite></a>. Of the three listed, one worked on the raw database export and one on the <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> Exporter-created <abbr
          class="abbr"
          title="eXtensible Markup Language">XML</abbr> file, which meant both were off the cards as my site used a lot of post-hook formatting that I wanted to include in the exports (primarily for footnoting). As a result, I was left with Cyril Schumacher&rsquo;s <a href="https://github.com/SchumacherFM/wordpress-to-hugo-exporter"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://github.com/SchumacherFM/wordpress-to-hugo-exporter"><span itemprop="name">wordpress-to-hugo-exporter</span></cite></a> (itself a port of a previous <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite>-to-<cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://jekyllrb.com"><span itemprop="name">Jekyll</span></cite> exporter). However, as I&rsquo;d kind of expected, this fell down when faced with my heavily-customised and media-heavy site. The former issue required me to <a href="https://github.com/SchumacherFM/wordpress-to-hugo-exporter/issues/97">tweak the Plugin</a> to include custom Post Types and Taxonomies, whilst the latter required me to <a href="https://github.com/SchumacherFM/wordpress-to-hugo-exporter/issues/95">temporarily delete my Media Library</a> to avoid a timeout.</p>
<h2 id="hosting" class="subheading">
  Hosting
  <a class="heading-anchor" href="#hosting">¶</a>
</h2>
<p>My site has been hosted by OVH for a long as I can remember and, whilst they have always had solid uptime, their control panel interface is horribly clunky and unusable on underpowered devices or slow Internet connections. I was keen to move, and as a fresh new <a href="https://ethicalconsumer.org"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Periodical"><meta itemprop="url" content="https://ethicalconsumer.org"><span itemprop="name">Ethical Consumer</span></cite></a> subscriber I also wanted to consider the environmental impact of my hosting provider&mdash;it&rsquo;s all well and good making <a href="https://www.wired.co.uk/article/internet-carbon-footprint">my site more efficient</a>, but it wouldn&rsquo;t amount to much if I didn&rsquo;t then host it using a sustainable provider. After shopping around, though, I found that OVH had the best combination of <a href="https://corporate.ovhcloud.com/en/sustainability/">environmental bona fides</a> (with 77% of their electricity coming from renewable sources) and cheap <abbr
          class="abbr"
          title="virtual private server">VPS</abbr> pricing, so I stuck with them despite their awful interface (reasoning that it would be less of a problem with a <abbr
          class="abbr"
          title="virtual private server">VPS</abbr>, as I could just <abbr
          class="abbr"
          title="Secure Shell">SSH</abbr> into the server to do any administration).</p>
<p>That said, one of the advantages of shifting to a static site (as mentioned by Swartz) is that it becomes trivial to switch to a new server, so this is a decision that I intend to revist at a later date.</p>
<h2 id="rewriting-my-site-template" class="subheading">
  Rewriting My Site Template
  <a class="heading-anchor" href="#rewriting-my-site-template">¶</a>
</h2>
<p>Whereas my past site updates have also come with major visual overhauls, in this instance I think I&rsquo;m pretty much content with the site design and don&rsquo;t see any compelling reason to drastically change it; it&rsquo;s boring, and that&rsquo;s the point. That works out fine, though, because I never actually got around to discussing my design considerations for the <a href="/portfolio/programs/omphaloskepsis/">Omphaloskepsis Theme</a>, so this can double as an ideal opportunity to finally do that.</p>
<h3 id="inspo" class="subsubheading">
  Inspo
  <a class="heading-anchor" href="#inspo">¶</a>
</h3>
<p>In its most succinct telling, the design of the site you see befoe you is the result of me misremembering and misunderstanding the point of a joke from <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Movie"><meta itemprop="url" content="https://www.imdb.com/title/tt0144084/"><span itemprop="name">American Psycho</span></cite>. I was kicking around ideas for a new site design and for whatever reason I vaguely remembered the business card scene from that film. <q>Wouldn&rsquo;t it be a funny reference</q>, I thought, <q>if my site was designed to resemble Paul Allen&rsquo;s business card from that scene?</q> Then I <a href="https://youtube.com/watch?v=DkND2f_DZfw">re-watched the scene</a> and realised that the whole <em>point</em> was that all of the business cards look identical, and Bateman&rsquo;s descriptions of them are intentionally meaningless. So I wouldn&rsquo;t be able to take a specific style from the scene, but the rough look stuck with me. And now here we are.</p>
<p>From this initial jumping-off point of <q>off-white background, black text and stark borders</q>, additional inspiration came flooding in. Part of the aesthetic that I was trying to mimic is that of a paper newspaper, and I was particularly influenced by the <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Newspaper"><meta itemprop="url" content="https://www.theguardian.com/"><span itemprop="name">Guardian</span></cite>&rsquo;s <a href="https://www.theguardian.com/%22">newspaper-esque look</a>, particularly its use of serif fonts. This was also around the time that <a href="https://brutalistwebsites.com/">Brutalist Web Design</a> was first being talked about, and I found the <a href="https://www.bloomberg.com/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Newspaper"><meta itemprop="url" content="https://www.bloomberg.com/"><span itemprop="name">Bloomberg</span></cite></a> site quite striking.<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup></p>
<p>In terms of information layout, I took a lot of inspiration from <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://wikipedia.org/"><span itemprop="name">Wikipedia</span></cite> (specifically, the <a href="https://www.howtogeek.com/866617/how-to-get-the-old-wikipedia-layout-back/">Vector 2010/Legacy Vector skin</a> that was recently replaced with a new, shittier default), particuarly around the highlighting of external links and the post meta sections. As perhaps the closest equivalent to the multipurpose role of my own site, <a href="https://gwern.net/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><meta itemprop="url" content="https://gwern.net/"><span itemprop="name">Gwern.net</span></cite></a> was a major influence in both style and layout.</p>
<p>Sites that I have found subsequent to completing the main design, which I consider to have sprung from similar priorities and which may have, in turn, fed back into tweaks to my own site, include <a href="https://solar.lowtechmagazine.com/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https:/lowtechmagazine.com/"><span itemprop="name">Low-Tech Magazine</span></cite>&rsquo;s solar-powered variant</a> and <a href="https://100r.co/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><meta itemprop="url" content="https://100r.co/"><span itemprop="name">Hundred Rabbits</span></cite></a>. Whilst I don&rsquo;t think it particularly inspired anything in my current site, I take the success of <a href="https://news.ycombinator.com"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://news.ycombinator.com"><span itemprop="name">Hacker News</span></cite></a> and its basic design as a reassuring counterpoint to the dominance of the Bullshit Web. Similarly, simplified versions of sites that are shitty by default, such as <a href="https://old.reddit.com/">the semi-hidden old skin for <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://reddit.com"><span itemprop="name">Reddit</span></cite></a> or the alternative clients <a href="https://teddit.net/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://teddit.net/"><span itemprop="name">Teddit</span></cite></a> (for the same), <a href="https://twitter.com/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://twitter.com/"><span itemprop="name">Nitter</span></cite></a> (for <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://twitter.com/"><span itemprop="name">Twitter</span></cite>) and <a href="https://invidious.io"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://invidious.io"><span itemprop="name">Invidious</span></cite></a> (for <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://youtube.com/"><span itemprop="name">YouTube</span></cite>).</p>
<p>From my own experiences of trying to navigate the Web using <a href="/blog/posts/blackberry-elegy/">outdated and under-powered devices</a>, I also like to apply a personal test of <q>would this be a pain in the arse to navigate on the BlackBerry Classic?</q> Similarly, I like Cory Doctorow&rsquo;s claim that <a href="https://pluralistic.net/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><meta itemprop="url" content="https://pluralistic.net/"><span itemprop="name">Pluralistic</span></cite></a> is <q>optimised for <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://en.wikipedia.org/wiki/Netscape_Navigator"><span itemprop="name">Netscape Navigator</span></cite></q> (and I was also inspired by a Bryan Lunduke video about command-line Web browsers such as <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://w3m.sourceforge.net/"><span itemprop="name">w3m</span></cite>, but it no longer seems to be available).</p>
<p>Lastly, one of the few things I can be proud of when it comes to the <abbr
          class="abbr"
          title="United Kingdom">UK</abbr> Government is the Government Digital Services&nbsp;(<abbr>GDS</abbr>)&rsquo;s incredible work on <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://gov.uk"><span itemprop="name">GOV.UK</span></cite>, and both the <a href="https://gds.blog.gov.uk/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><meta itemprop="url" content="https://gds.blog.gov.uk/"><span itemprop="name">GDS Blog</span></cite></a> and <a href="https://insidegovuk.blog.gov.uk/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Blog"><meta itemprop="url" content="https://insidegovuk.blog.gov.uk/"><span itemprop="name">Inside GOV.UK</span></cite></a> are chock-full of gems, and I&rsquo;ve taken huge inspiration from <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://gov.uk/"><span itemprop="name">GOV.UK</span></cite> itself, various <abbr
          class="abbr"
          title="Government Digital Services">GDS</abbr> posts and the <a href="https://www.gov.uk/guidance/government-design-principles"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebContent"><meta itemprop="url" content="https://www.gov.uk/guidance/government-design-principles"><span itemprop="name">Government Design Principles</span></cite></a>.</p>
<h3 id="making-the-same-thing-again" class="subsubheading">
  Making the Same Thing, Again
  <a class="heading-anchor" href="#making-the-same-thing-again">¶</a>
</h3>
<p>To begin with, I just wanted to match the style and functionality of my old site. As it turns out, this was pretty easy, with the biggest effort being the splitting of my <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis/src/branch/master/style.css">monolithic 1,578-line stylesheet</a> into a more cleanly-separated set of small <abbr
          class="abbr"
          title="Sassy Cascading Style Sheets">SCSS</abbr> files, following the <a href="https://sass-guidelin.es/#the-7-1-pattern">7-1 pattern</a> as closely as possible. Also, I started working on the Omphaloskepsis Theme in 2018, and I&rsquo;ve learnt a lot about frontend development since then, so I also reworked my stylesheets to use the <a href="https://en.bem.info/methodology/quick-start/"><abbr
          class="abbr"
          title="Block, Element, Modifier">BEM</abbr> naming methodology</a>.</p>
<p>Obviously, given that I am using an entirely new templating language, the template files for my old and new site look entirely different (e.g., compare the <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis/src/branch/master/template-parts/content-single.php">old site&rsquo;s single post template</a> with the <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/src/branch/main/layouts/blog/single.html">new site&rsquo;s</a>). However, the resulting <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr>  looks largely the same, except much cleaner now (I don&rsquo;t even know what some of the things in the <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> <abbr
           class="abbr"
           title="Hypertext Markup Language">HTML</abbr>  are, nor where they come from).</p>
<p>Another advantage of shifting to a static site generator, at least for my perfectionist self, is that I can now run <a href="https://prettier.io/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://prettier.io/"><span itemprop="name">Prettier</span></cite></a> over all of my output <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr>  files to ensure that they are nicely formatted and contain no errors, which wasn&rsquo;t possible with the fried-on-demand <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://wordpress.com"><span itemprop="name">WordPress</span></cite> pages. The difference is stark: just compare <a href="/blog/posts/baking-bengoldsworthy.net/docs/old-explorer-belt-post.foo">the markup</a> from the old site with <a href="https://bengoldsworthy.net/blog/posts/explorer-belt-2019/">this output HTML</a> (be sure to add <code>view-source:</code> before the URL in your Web browser) for the same post from the new one.</p>
<p>I did make a couple subtle design tweaks though, such as grouping the post meta section into a visually-distinct box and adding anchor links besides the section headings. For the most part, though, the site I produced looks almost identical to the old one:</p>



<div class="picture__wrapper" role="group">
  <div class="picture__wrapper-visual">



<picture class="picture" itemprop="image" >
  

<source srcset="/blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_e68ff420c9beb1e9.avif, /blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_b225549a1173f42a.avif 800w, /blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_f9d8a5fd3d90eae6.avif 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>


<source srcset="/blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_599af8c5ebb9015b.webp, /blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_1720eb9f8a1839a8.webp 800w, /blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_8672b2f702b14bda.webp 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>
<img class="u-photo picture__image"  src="/blog/posts/baking-bengoldsworthy.net/images/old-and-new-explorer-belt-post-comparison_hu_77b52493f53e26e1.webp"  width="1200"  height="1416"  alt="Two screenshots of the same post on both my old and new site"  loading="lazy" />
</picture>




<p class="attr">Screenshots by the author</p>
</div><div class="figure__caption"><p class="figcaption__caption">The design of the single post page on the old site (left) and the new one (right)</p></div></div>

<h3 id="new-bells-and-whistles" class="subsubheading">
  New Bells and Whistles
  <a class="heading-anchor" href="#new-bells-and-whistles">¶</a>
</h3>
<p>Having pretty much achieved parity with my old site, it was now time to think about new features I wanted to add. One of these was the addition of new taxonomies, such as the Life Areas that I have started to use to organise myself (for an example of these in action, see my <a href="/blog/posts/review-of-2022/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/BlogPosting"><span itemprop="name">Review of 2022</span></cite></a> post). I also changed how the locations were displayed, replacing the original unordered list into a map infographic using OpenLayers. Also on the topic of taxonomies, I am now starting to classify content by skills evidenced. Currently I&rsquo;m generally just making up the skills as I go along, but where possible I am trying to align to specific frameworks (e.g., the <a href="https://www.bcs.org/it-careers/sfiaplus-it-skills-framework/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebContent"><meta itemprop="url" content="https://www.bcs.org/it-careers/sfiaplus-it-skills-framework/"><span itemprop="name">SFIA<i><b>plus</b></i></span></cite> <abbr
           class="abbr"
           title="information technology">IT</abbr> skills framework</a> from <abbr
          class="abbr"
          title="BCS, the Chartered Institute for IT">BCS</abbr> or the <a href="https://www.ciisec.org/CIISEC/CIISEC/Resources/Skills_Framework.aspx"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebContent"><meta itemprop="url" content="https://www.ciisec.org/CIISEC/CIISEC/Resources/Skills_Framework.aspx"><span itemprop="name"><abbr title="Chartered Institute for Information Security">CIISec</abbr> Skills Framework</span></cite></a> specific to information security).</p>
<p>One very, very, <em>very</em> long-postponed project of mine has been to go back through all of my site content and ensure that images are properly attributed and have any relevant licensing information included. In addition, I want to ensure that every single image comes with <code>alt</code> text for accessibility reasons. Both of these were included in my efforts to convert all of my content into Page Bundles, which I&rsquo;ll go into more <a href="#trimming-the-fat">later</a>.</p>
<!--  -->
<p>I also added some top-level <a href="https://schema.org"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://schema.org"><span itemprop="name">Schema.org</span></cite></a> semantic markup to my site templates (e.g., <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/src/commit/43ddb22f807a4dbe10d0539ad0b03a6ffa616e72/layouts/_default/baseof.html#L48">here</a>) and I have created a new <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/src/branch/main/layouts/shortcodes/cite.html">citation shortcode</a> that automatically applies this markup. Speaking of shortcodes, I also whipped one up <a href="https://code.bengoldsworthy.net/Rumperuu/Omphaloskepsis-2/src/branch/main/layouts/shortcodes/abbr.html">for abbreviations</a> (very much \( BibTeX \)-inspired) that I&rsquo;m hoping to extend later into an automatic glossary generation step. Lastly, I added a post wordcount estimation.</p>
<p>Finally, I&rsquo;m working my way up the IndieMark levels and now have a <a href="https://indiewebify.me/validate-h-card/?url=https%3A%2F%2Fbengoldsworthy.net%2F">representative h-card</a> and per-post <a href="https://indiewebify.me/validate-h-entry/?url=https%3A%2F%2Fbengoldsworthy.net%2Fblog%2Fposts%2Fexplorer-belt-2019">h-entries</a> added to my markup. Next step, Webmentions!</p>
<h2 id="cleaning-up-the-exported-data" class="subheading">
  Cleaning Up the Exported Data
  <a class="heading-anchor" href="#cleaning-up-the-exported-data">¶</a>
</h2>
<p>My use of automatic exporting tools no doubt saved me a huge amount of time and effort, but it left a wide range of bugs and quirks across the output files that required me to manually clean up. When I got lucky, these were easy enough to fix in bulk with some <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://www.gnu.org/software/sed/manual/sed.html"><span itemprop="name">sed</span></cite>-fu, but sometimes there was no alternative to just manually going through every file and making alterations.</p>
<p>Some things were trivial, like replacing unwanted <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr>  entities (e.g., <code>&amp;#8217;</code>s) with the appropriate characters (e.g., apostrophes). Others were trickier, and would be reflexively informed by decisions I made as I learnt more about Hugo&rsquo;s approach to content organisation.</p>
<p>As an example, take the following article frontmatter that was automatically exported (for <a href="/blog/posts/explorer-belt-2019/">this article</a>):</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#ae81ff">Explorer Belt 2019</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">author</span>: <span style="color:#ae81ff">Ben</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">type</span>: <span style="color:#ae81ff">post</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">date</span>: <span style="color:#e6db74">2019-12-03T07:49:54</span><span style="color:#ae81ff">+00</span>:<span style="color:#ae81ff">00</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">url</span>: <span style="color:#ae81ff">/2019/12/explorer-belt-2019/</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">featured_image</span>: <span style="color:#ae81ff">/wp-content/uploads/2019/12/explorer-belt-1200x900.jpg</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">Subtitle</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Serbia</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC1</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#e6db74">&#39;What &lt;em&gt;is&lt;/em&gt; the Explorer Belt?&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC2</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Planning and Preparation</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC3</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Prelude</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC4</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#e6db74">&#39;Day 1 - Dupljaj to Stepanje&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC5</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#e6db74">&#39;Day 2 - Stepanje to...Stepanje&#39;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">ToC6</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#e6db74">&#39;Day 3 - Stepanje to Ub&#39;</span>
</span></span><span style="display:flex;"><span>[<span style="color:#ae81ff">...]</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">categories</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Reports</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><p>The <code>author</code>, <code>type</code> and <code>url</code> parameters are unnecessary, as is the manually-defined list of section headings for the <a href="https://gohugo.io/content-management/toc/">table of contents</a>. Also, I had to standardise my custom parameters and convert their data types, such as turning the <code>Subtitle</code> parameter from a list of values into a single value and removing the initial capital letter. I also added additional taxonomies by which to organise my content, and want to convert all of my content into post bundles, and I wanted to neaten up the frontmatter itself with some vertical spacing.</p>
<p>The end result of my cleanup for the above article now looks like this:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-yaml" data-lang="yaml"><span style="display:flex;"><span>---
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Meta</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">title</span>: <span style="color:#ae81ff">Explorer Belt 2019</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">subtitle</span>: <span style="color:#ae81ff">Serbia</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">summary</span>: |<span style="color:#e6db74">
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">  &#34;This summer, I spent a couple weeks traipsing across the small Balkan nation of Serbia, 
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">  with the aim of earning an Explorer Belt. My team of four set off as ‘Ms Butterfield&#39;s Boys’, 
</span></span></span><span style="display:flex;"><span><span style="color:#e6db74">  and returned as ‘Team Luxury’; this is the story of how that happened.&#34;</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">date</span>: <span style="color:#e6db74">2019-12-03T07:49:54</span><span style="color:#ae81ff">+00</span>:<span style="color:#ae81ff">00</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">lastmod</span>: <span style="color:#e6db74">2021-01-24T00:00:00</span><span style="color:#ae81ff">+00</span>:<span style="color:#ae81ff">00</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Resources</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">featured_image</span>: <span style="color:#ae81ff">explorer-belt</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">resources</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#f92672">name</span>: <span style="color:#ae81ff">explorer-belt</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">src</span>: <span style="color:#ae81ff">images/explorer-belt.*</span>
</span></span><span style="display:flex;"><span>    <span style="color:#f92672">params</span>:
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">alt</span>: <span style="color:#ae81ff">Four people seen from by behind, looking out over the Serbian landscape</span>
</span></span><span style="display:flex;"><span>      <span style="color:#f92672">attr</span>: <span style="color:#ae81ff">Photo by the author</span>
</span></span><span style="display:flex;"><span>  - [<span style="color:#ae81ff">...]</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#75715e"># Taxonomies</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">organisations</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">The Congressional Award</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">West Lancs Scouts</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">locations</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Banjani, RS</span>
</span></span><span style="display:flex;"><span>  - [<span style="color:#ae81ff">...]</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">categories</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Trips</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">areas</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">Fun, Travel &amp; Adventure</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">skills</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">fitness/hiking</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">travel/trip planning</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">social</span>
</span></span><span style="display:flex;"><span><span style="color:#f92672">tags</span>:
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">challenge</span>
</span></span><span style="display:flex;"><span>  - <span style="color:#ae81ff">culture</span>
</span></span><span style="display:flex;"><span>  - [<span style="color:#ae81ff">...]</span>
</span></span><span style="display:flex;"><span>---
</span></span></code></pre></div><h2 id="trimming-the-fat" class="subheading">
  Trimming the Fat
  <a class="heading-anchor" href="#trimming-the-fat">¶</a>
</h2>
<p>As I&rsquo;ve mentioned, I wasn&rsquo;t able to export my Media Library using the <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://github.com/SchumacherFM/wordpress-to-hugo-exporter"><span itemprop="name">wordpress-to-hugo-exporter</span></cite>, and so had to manually copy my <code>wp-content/uploads/</code> directory. By just sticking it directly into the <code>static/</code> directory of my new <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite> site, I could ensure that all media links in the exported page content would still work, but this was only a temporary measure. Not only does the <code>wp-content/uploads/</code> directory contain many duplicate resources, as well as multiple copies of each image at different sizes, but it also centralises every resource away from the content files.</p>
<p>As part of my move to <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite>, I wanted to convert every piece of content into a <a href="https://gohugo.io/content-management/page-bundles/">Page Bundle</a>: a folder containing the content file and all of its raw resources, together in one place. Not only does this make each piece of content a single self-contained bundle (rather than separating content and resources), but by including resources as Page Resources rather than just statically-linked files I would gain access to <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite>&rsquo;s <a href="https://gohugo.io/content-management/image-processing/">image processing pipelines</a>, meaning that I could store raw image files alongside page content, but resize them and convert them to a more Web-suitable image format on render, producing a smaller output filesize.</p>
<p>Initially, though, I wasn&rsquo;t seeing the filesize reductions I was expecting. It took me a while, but I eventually discovered that you need to <a href="https://discourse.gohugo.io/t/is-it-possible-to-only-include-processed-page-resources-in-the-resulting-page-bundle/43200">manually tell <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite></a> not to include the raw, unprocessed Page Resources in the output as well. The results were immediately impressive, knocking my <q>non-page files</q> down from 760 to just 35 and the size of my output directory from 3.3 <abbr
          class="abbr"
          title="gigabytes">GB</abbr> to 2.7 <abbr
          class="abbr"
          title="gigabytes">GB</abbr> (and this with only a small number of my pages bundled so far).</p>
<p>For an example of an especially resource-heavy post, take the Explorer Belt article I highlighted earlier. After translating it over to my new site with the resources as-is, the whole page download came to 23.56 <abbr
          class="abbr"
          title="megabytes">MB</abbr> (with a fresh cache), compared to 22.45 <abbr
          class="abbr"
          title="megabytes">MB</abbr> for the old site&rsquo;s version of the page. The actual size of all the resource files on the server, however, came to 47 <abbr
          class="abbr"
          title="megabytes">MB</abbr>. However, after converting the post into a Page Bundle (and, by extension, converting all of the image files into WebPs and wrapping them in <code>&lt;figure&gt;</code> and <code>&lt;picture&gt;</code> tags for extra points), this was reduced to 20.50 <abbr
          class="abbr"
          title="megabytes">MB</abbr> for the page download and 34.6 <abbr
          class="abbr"
          title="megabytes">MB</abbr> for the actual bundle files.<sup id="fnref:3"><a href="#fn:3" class="footnote-ref" role="doc-noteref">3</a></sup></p>
<h2 id="quantitative-comparisons" class="subheading">
  Quantitative Comparisons
  <a class="heading-anchor" href="#quantitative-comparisons">¶</a>
</h2>
<p>Qualitative comparisons are one thing, but there are plenty of ways we can compare the old and new sites in more quantitative terms:</p>
<h3 id="page-speed" class="subsubheading">
  Page Speed
  <a class="heading-anchor" href="#page-speed">¶</a>
</h3>
<p>To begin with, my old site&rsquo;s metrics were never very bad. For example, it scored highly on <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://pagespeed.web.dev/"><span itemprop="name">PageSpeed Insights</span></cite> (higher is better; old site figures translucent on the left, new site figures opaque on the right):</p>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="pagespeed-insights"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">PageSpeed Insights Test Results (as at 2023-05-11)</h4><p class="figcaption__caption">Note: Whilst I am still working on the site I am intentionally using an inefficient cache policy, which impacts on the ‘Performance’ score. I have also intentionally chosen to block search engines from indexing my site, which impacts the ‘SEO’ score.</p></figcaption></figure>

<p>I did have to manually enable several things that I had taken for granted due to WordPress automatically providing them; for example, <a href="https://developer.chrome.com/docs/lighthouse/performance/uses-text-compression/">text compression</a> using <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://www.gnu.org/software/gzip/"><span itemprop="name">Gzip</span></cite>.<sup id="fnref:4"><a href="#fn:4" class="footnote-ref" role="doc-noteref">4</a></sup> I also have a bunch of new improvements to add to my ever-growing to-do list, such as breaking up my stylesheet into ones specific to each type of page and their components to avoid making the user download unused styles, as well as enabling me to split out critical and non-critical styles, and only delay the initial page render whilst waiting for the former to download.</p>
<h3 id="accessibility" class="subsubheading">
  Accessibility
  <a class="heading-anchor" href="#accessibility">¶</a>
</h3>
<p>Similarly, a site accessibility assessment only showed up a few minor issues (lower is better except for <abbr
          class="abbr"
          title="Accessible Rich Internet Applications">ARIA</abbr>, which is is neither inherently better higher or lower; ditto previous chart comment for the old and new site figures):<sup id="fnref:5"><a href="#fn:5" class="footnote-ref" role="doc-noteref">5</a></sup></p>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="wave-accessibility"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">WAVE Web Accessibility Evaluation Tool Accessibility Test Results (as at 2023-05-11)</h4></figcaption></figure>

<p>However, most accessibility features can&rsquo;t be tested for automatically, so watch out for the <abbr
          class="abbr"
          title="Web Content Accessibility Guidelines">WCAG</abbr> audit I plan to do at some point.</p>
<h3 id="markup-validation" class="subsubheading">
  Markup Validation
  <a class="heading-anchor" href="#markup-validation">¶</a>
</h3>
<p>These both show the power of focusing on standards-compliant, efficient Web markup: I&rsquo;ve ever really invested any time in improving my page speed or accessibility, and those decent scores were unintentional side-effects of ensuring that I was writing proper <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr>, as we can see from the <a href="http://validator.w3.org/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="http://validator.w3.org/"><span itemprop="name">W3C HTML Validator</span></cite></a> (lower is better; ditto ditto):</p>
<figure
  class="article__figure figure figure--chart"
  role="group"
><div class="chart-container">
      <canvas
        width="auto"
        class="chart"
        id="html-validator"
      >
        You must enable Javascript to view this chart.
      </canvas>
    </div><figcaption class="figure__caption"><h4 class="figcaption__title">W3C HTML Validator Results (as at 2023-05-11)</h4></figcaption></figure>

<p>That said, running these tests was also a good reminder for me that standards are ever-changing. Last time I looked, the HTML standard stated that the different levels of heading tags (<code>&lt;h1&gt;</code>&ndash;<code>&lt;h6&gt;</code>) were scoped only to the sections they are within; i.e., a Web site could have multiple <code>&lt;h1&gt;</code>s, provided there was only one per <code>&lt;section&gt;</code>, <code>&lt;article&gt;</code>, <code>&lt;aside&gt;</code>, etc. However, the <q>document outline</q> algorithm that would have supported this <a href="https://html5doctor.com/computer-says-no-to-html5-document-outline/">was never adopted</a> by browser developers, and after seven years of no progress the <abbr
          class="abbr"
          title="Hypertext Markup Language">HTML</abbr> 5.1 spec. advises to continue using only one <code>&lt;h1&gt;</code> header per page to guarantee accessibility.</p>
<h3 id="http-security-headers" class="subsubheading">
  HTTP Security Headers
  <a class="heading-anchor" href="#http-security-headers">¶</a>
</h3>
<p>My previous site achieved an A+ grade for its implementation of <abbr
          class="abbr"
          title="Hypertext Transfer Protocol">HTTP</abbr> security headers from <a href="https://securityheaders.com"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://securityheaders.com"><span itemprop="name">Security Headers</span></cite></a> (the highest available), and so I ensured that the new site <a href="https://securityheaders.com/?q=bengoldsworthy.net&amp;hide=on&amp;followRedirects=on">achieved the same grade</a>. I also took the time to remove some now-deprecated headers like <code>Expect-CT</code> and to add some new upcoming ones like <code>Cross-Origin-Embedder-Policy</code>.</p>
<h3 id="script-hosting" class="subsubheading">
  Script Hosting
  <a class="heading-anchor" href="#script-hosting">¶</a>
</h3>
<p>My old site made requests to the following domains for content:</p>
<ul>
<li>first-party</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://getbootstrap.com/"><span itemprop="name">Bootstrap</span></cite>;</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://fonts.google.com"><span itemprop="name">Google Fonts</span></cite>;</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://gravatar.com/"><span itemprop="name">Gravatar</span></cite>;</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://www.jsdelivr.com/"><span itemprop="name">jsDelivr</span></cite>;</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://rawgit.com/"><span itemprop="name">RawGit</span></cite>; and</li>
<li><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/WebSite"><meta itemprop="url" content="https://wordpress.com/"><span itemprop="name">WordPress</span></cite>.</li>
</ul>
<p>My new site only makes request to local content; there are no third-party requests. Where I have dependencies (e.g., the <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://openlayers.org/"><span itemprop="name">OpenLayers</span></cite> library used for displaying map visualisations) I download and locally host the scripts.</p>
<h2 id="what-now" class="subheading">
  What Now?
  <a class="heading-anchor" href="#what-now">¶</a>
</h2>
<p>There is still a huge amount of work to do, from continuing to convert the remaining content into Page Bundles to updating past content to use things like my new citation shortcode. The <abbr
          class="abbr"
          title="curriculum vitae">CV</abbr> tool is still in a rudimentary state, and I would like to conduct a full <abbr
          class="abbr"
          title="Web Content Accessibility Guidelines">WCAG</abbr> accessibility audit on the site in the near future. I haven&rsquo;t yet taken a proper look at the format of the Atom feed for the site, so reading through the spec to see what features I can play with will probably be a large timesink. A dark theme for the site is also still a work-in-progress, and at some point I will probably buy a license for the <a href="https://input.djr.com/">Input Sans font</a> for code samples.</p>
<p>I also still have a few features I haven&rsquo;t even started looking into how to implement yet, such as Webmentions and an automated <abbr
          class="abbr"
          title="Publish (on your) Own Site, Syndicate Elsewhere">POSSE</abbr> workflow, and I hope that <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://gohugo.io"><span itemprop="name">Hugo</span></cite> introduces video processing pipelines in the near future (or, perhaps, I can have a go at adding them myself if I find the time).</p>
<p>As things stand, though, I finally have the lovely baked site that I&rsquo;ve been thinking about for years. I also have a <abbr
          class="abbr"
          title="virtual private server">VPS</abbr>, with all of the opportunities that gives me for hosting other services on different subdomains; I&rsquo;ll talk about these in a later post.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>Here are some of my original design notes, which I&rsquo;ve been lugging around ever since:</p>
<p>
    
    
    
    <figure class="article__figure figure" role="group">
        <div class="picture__wrapper-visual">
    
    
    
    <picture class="picture" itemprop="image" >
      
    
    <source srcset="/blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_27b2cad1a59cdbfc.avif, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_d9a76a51f85189fa.avif 1200w, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_a799c06daee9a654.avif 800w, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_ce5fae1f741d8abc.avif 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>
    
    
    <source srcset="/blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_ecb9d43a8cb4c27a.webp, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_b42cb14f0990a979.webp 1200w, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_cf108780bb3d94e6.webp 800w, /blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_cc8d50d37320d7a1.webp 500w" sizes="(min-width: 1248px) 60vw, 100vw"/>
    <img class="u-photo picture__image"  src="/blog/posts/baking-bengoldsworthy.net/images/design-notes_hu_f32e0a86cc61b25f.jpeg"  width="1295"  height="1177"  alt="Design notes"  loading="lazy" />
    </picture>
    
    
    
    
    <p class="attr">Photo by the author</p>
    </div></figure>
&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:2">
<p>Perhaps the more obvious newspaper site to compare to me own off-white, serif font site is that of the <a href="https://www.ft.com/"><cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/Periodical"><meta itemprop="url" content="https://www.ft.com/"><span itemprop="name">Financial Times</span></cite></a>, but I only encountered it well after I had finalised my own design.&#160;<a href="#fnref:2" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:3">
<p>It&rsquo;s worth noting, though, that 29.8 <abbr
          class="abbr"
          title="megabytes">MB</abbr> of this was a single video file, and Hugo currently does not have any automatic video processing features.&#160;<a href="#fnref:3" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:4">
<p>I&rsquo;d like to use <a href="https://www.brotli.org/">Brotli</a>, but currently this requires either a paid version of <cite
      class="cite"
      itemscope itemprop="citation" itemtype="https://schema.org/SoftwareApplication"><meta itemprop="url" content="https://nginx.org/en/"><span itemprop="name">NGINX</span></cite> or expending more effort than I care to.&#160;<a href="#fnref:4" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
<li id="fn:5">
<p>This actually shows the value of validating your markup early and often: it turns out that I had been adding the alt text information for all of my newly-bundle Page Resources incorrectly, and so nothing was being rendered and my accessibility scores were suffering. I only realised this whilst writing this piece, and had to fix it by running the following RegEx over all of my Page Bundles:</p>
<pre>s/(alt: .*)\n[ ]{4}(src: .*)\n[ ]{2}(params:)\n/\2\n    \3\n      \1\n/m</pre>
&#160;<a href="#fnref:5" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></li>
</ol>
</div>
]]></content:encoded>
    </item>
    
  </channel>
</rss>

