<?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/programming/PHP on Ben Goldsworthy</title>
    <link>https://bengoldsworthy.net/skills/computer-languages/programming/php/</link>
    <description>Recent content in computer languages/programming/PHP 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>Thu, 13 Jul 2023 00:00:00 +0000</lastBuildDate><atom:link href="https://bengoldsworthy.net/skills/computer-languages/programming/php/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Solidarity Economy Association</title>
      <link>https://bengoldsworthy.net/portfolio/websites/solidarity-economy-association/</link>
      
      <pubDate>Thu, 13 Jul 2023 00:00:00 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/portfolio/websites/solidarity-economy-association/</guid>
      <description></description>
      <content:encoded><![CDATA[]]></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>
    
    <item>
      <title>Wayward</title>
      <link>https://bengoldsworthy.net/portfolio/programs/wayward/</link>
      
      <pubDate>Sat, 01 Apr 2023 00:00:00 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/portfolio/programs/wayward/</guid>
      <description></description>
      <content:encoded><![CDATA[]]></content:encoded>
    </item>
    
    <item>
      <title>Developer</title>
      <link>https://bengoldsworthy.net/cv/roles/developer/</link>
      
      <pubDate>Thu, 19 Jan 2023 00:00:00 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/cv/roles/developer/</guid>
      <description></description>
      <content:encoded><![CDATA[]]></content:encoded>
    </item>
    
    <item>
      <title>Where in the World is Ben?</title>
      <link>https://bengoldsworthy.net/portfolio/websites/where-in-the-world-is-ben/</link>
      
      <pubDate>Tue, 30 Aug 2022 00:00:00 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/portfolio/websites/where-in-the-world-is-ben/</guid>
      <description>&lt;p&gt;I cobbled together a tracking app to allow friends and family to track my whereabouts whilst I am travelling, and to allow me to record my adventures. The app uses &lt;a href=&#34;https://wayward.travel&#34;&gt;Wayward&lt;/a&gt; to do the actual recording, and then renders the data feed with a few other additions.&lt;/p&gt;
&lt;p&gt;Additional features include caching, rate limiting, content filtering and text formatting.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I cobbled together a tracking app to allow friends and family to track my whereabouts whilst I am travelling, and to allow me to record my adventures. The app uses <a href="https://wayward.travel">Wayward</a> to do the actual recording, and then renders the data feed with a few other additions.</p>
<p>Additional features include caching, rate limiting, content filtering and text formatting.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>footnotes</title>
      <link>https://bengoldsworthy.net/portfolio/programs/footnotes/</link>
      
      <pubDate>Sun, 24 Jan 2021 08:58:02 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/portfolio/programs/footnotes/</guid>
      <description>&lt;p&gt;I began contributing to the development of footnotes, a popular WordPress Plugin with over 7,000 installations, after posting a bug report on the &lt;a href=&#34;https://wordpress.org/support/topic/line-wrap-href-regex-bug/#post-13946443&#34;&gt;Support Forum&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My main contributions were to set up a &lt;a href=&#34;https://github.com/markcheret/footnotes/projects/3&#34;&gt;proper development workflow&lt;/a&gt; including automated code linting and formatting, unit testing and coding standards compliance, as well as to move development away from SVN (pushing changes directly to the WordPress Plugin Directory repository) and onto Git (with development to take place on GitHub and the WordPress Plugin Directory to be used only as a release repository).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I began contributing to the development of footnotes, a popular WordPress Plugin with over 7,000 installations, after posting a bug report on the <a href="https://wordpress.org/support/topic/line-wrap-href-regex-bug/#post-13946443">Support Forum</a>.</p>
<p>My main contributions were to set up a <a href="https://github.com/markcheret/footnotes/projects/3">proper development workflow</a> including automated code linting and formatting, unit testing and coding standards compliance, as well as to move development away from SVN (pushing changes directly to the WordPress Plugin Directory repository) and onto Git (with development to take place on GitHub and the WordPress Plugin Directory to be used only as a release repository).</p>
<p>I also set about <a href="https://github.com/markcheret/footnotes/projects/4">refactoring the 8-year-old codebase</a> to produce a cleaner, more efficient Plugin in which issues would be easier to diagnose, development would be more enjoyable and releases would be more stable. As part of this, I ported the codebase to PHP 8.0 and added automatic Rectorisation to the workflow to produce output that would be compatible with WordPress, whilst still allowing us access to the latest language features for development.</p>
<p>Unfortunately, the Plugin owner went out of contact and <a href="https://wordpress.org/support/topic/plugin-is-abandoned-3/">the Plugin is now abandoned</a>, but I did my best to inform the userbase in a helpful way and I learnt a lot about development within the WordPress ecosystem from this project.</p>
]]></content:encoded>
    </item>
    
    <item>
      <title>footnotes</title>
      <link>https://bengoldsworthy.net/portfolio/programs/footnotes/</link>
      
      <pubDate>Sun, 24 Jan 2021 08:58:02 +0000</pubDate>
      <author>me&#43;bgrss@bengoldsworthy.net (Ben Goldsworthy)</author>
      <guid>https://bengoldsworthy.net/portfolio/programs/footnotes/</guid>
      <description>&lt;p&gt;I began contributing to the development of footnotes, a popular WordPress Plugin with over 7,000 installations, after posting a bug report on the &lt;a href=&#34;https://wordpress.org/support/topic/line-wrap-href-regex-bug/#post-13946443&#34;&gt;Support Forum&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My main contributions were to set up a &lt;a href=&#34;https://github.com/markcheret/footnotes/projects/3&#34;&gt;proper development workflow&lt;/a&gt; including automated code linting and formatting, unit testing and coding standards compliance, as well as to move development away from SVN (pushing changes directly to the WordPress Plugin Directory repository) and onto Git (with development to take place on GitHub and the WordPress Plugin Directory to be used only as a release repository).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I began contributing to the development of footnotes, a popular WordPress Plugin with over 7,000 installations, after posting a bug report on the <a href="https://wordpress.org/support/topic/line-wrap-href-regex-bug/#post-13946443">Support Forum</a>.</p>
<p>My main contributions were to set up a <a href="https://github.com/markcheret/footnotes/projects/3">proper development workflow</a> including automated code linting and formatting, unit testing and coding standards compliance, as well as to move development away from SVN (pushing changes directly to the WordPress Plugin Directory repository) and onto Git (with development to take place on GitHub and the WordPress Plugin Directory to be used only as a release repository).</p>
<p>I also set about <a href="https://github.com/markcheret/footnotes/projects/4">refactoring the 8-year-old codebase</a> to produce a cleaner, more efficient Plugin in which issues would be easier to diagnose, development would be more enjoyable and releases would be more stable. As part of this, I ported the codebase to PHP 8.0 and added automatic Rectorisation to the workflow to produce output that would be compatible with WordPress, whilst still allowing us access to the latest language features for development.</p>
<p>Unfortunately, the Plugin owner went out of contact and <a href="https://wordpress.org/support/topic/plugin-is-abandoned-3/">the Plugin is now abandoned</a>, but I did my best to inform the userbase in a helpful way and I learnt a lot about development within the WordPress ecosystem from this project.</p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>

