<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Compiled Thoughts RSS Feed]]></title><description><![CDATA[Olav Ringdal writes about software. Now with a GraphQL layer.]]></description><link>https://blogoboros.fly.dev</link><generator>GatsbyJS</generator><lastBuildDate>Fri, 12 Jun 2026 06:03:02 GMT</lastBuildDate><item><title><![CDATA[How I migrated this blog from Hugo to Gatsby]]></title><description><![CDATA[Hello again. Yes, it has been a while — the last post here is the one where I moved to Hugo and promised four drafts were coming. Three of…]]></description><link>https://blogoboros.fly.dev/03/how-i-migrated-this-blog-from-hugo-to-gatsby/</link><guid isPermaLink="false">https://blogoboros.fly.dev/03/how-i-migrated-this-blog-from-hugo-to-gatsby/</guid><pubDate>Sat, 24 Mar 2018 16:20:00 GMT</pubDate><content:encoded>&lt;p&gt;Hello again. Yes, it has been a while — the last post here is the one where I &lt;a href=&quot;/2015/&quot;&gt;moved to Hugo&lt;/a&gt; and promised four drafts were coming. Three of those drafts are dead now and the fourth one is this post. Let&apos;s not dwell on it. Big things have happened: &lt;strong&gt;this blog is now a React application.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I can hear you typing the comment already: &lt;em&gt;&quot;Olav, it&apos;s a blog. It has one post. Why is it an application?&quot;&lt;/em&gt; And to that I say: you&apos;re thinking about it wrong. It&apos;s not a blog anymore. It&apos;s part of the &lt;strong&gt;JAMstack&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;What was wrong with Hugo&lt;/h2&gt;
&lt;p&gt;Honestly? Nothing. Hugo was fast and it never broke. But every time I wanted to change the layout I had to write Go templates, and Go templates are what happens when a programming language files a restraining order against you. I don&apos;t want &lt;code class=&quot;language-text&quot;&gt;{{ partial &quot;header.html&quot; . }}&lt;/code&gt;. I want &lt;em&gt;components&lt;/em&gt;. I want my header to be a function. It&apos;s 2018; my blog should be made of the same material as my day job.&lt;/p&gt;
&lt;h2&gt;Enter Gatsby&lt;/h2&gt;
&lt;p&gt;&lt;a href=&quot;https://www.gatsbyjs.org/&quot;&gt;Gatsby&lt;/a&gt; renders React to static HTML at build time, then &lt;em&gt;rehydrates&lt;/em&gt; it in the browser into a full single-page app. Every internal navigation is instant because Gatsby &lt;strong&gt;prefetches the next page before you click&lt;/strong&gt;. My blog now loads pages the reader hasn&apos;t decided to read yet. That&apos;s how fast it is.&lt;/p&gt;
&lt;p&gt;The stack inventory, because the genre demands it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;React&lt;/strong&gt; components all the way down. My &lt;code class=&quot;language-text&quot;&gt;&amp;lt;Bio /&gt;&lt;/code&gt; is a component. The bio is one sentence.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GraphQL.&lt;/strong&gt; The post you are reading was retrieved by this query, which runs &lt;em&gt;at build time&lt;/em&gt; against my filesystem:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;gatsby-highlight&quot; data-language=&quot;graphql&quot;&gt;&lt;pre class=&quot;language-graphql&quot;&gt;&lt;code class=&quot;language-graphql&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property-query&quot;&gt;allMarkdownRemark&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token attr-name&quot;&gt;sort&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;frontmatter&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;date&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token constant&quot;&gt;DESC&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token object&quot;&gt;nodes&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token object&quot;&gt;frontmatter&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;date&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Is a query language necessary for one Markdown file? The word &quot;necessary&quot; is doing a lot of work in that sentence. It&apos;s &lt;em&gt;correct&lt;/em&gt;, architecturally.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;gatsby-plugin-sharp&lt;/strong&gt; resizes and optimizes my images into responsive srcsets with blur-up placeholders. I have one image. It&apos;s my avatar. It has never looked better.&lt;/li&gt;
&lt;li&gt;Lighthouse score: &lt;strong&gt;100/100/100/100.&lt;/strong&gt; I have screenshotted it. The screenshot is not optimized because it&apos;s on my other machine.&lt;/li&gt;
&lt;li&gt;Deployed to Netlify on push. Build takes 94 seconds, which I&apos;m told is the price of progress (Hugo did it in 0.4s, but Hugo wasn&apos;t &lt;em&gt;hydrated&lt;/em&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;URLs stay &lt;code class=&quot;language-text&quot;&gt;/year/month/title/&lt;/code&gt;, as they have since 2009. Five years, three engines, zero broken links. The permalink structure is at this point the only stable API I maintain.&lt;/p&gt;
&lt;h2&gt;The future&lt;/h2&gt;
&lt;p&gt;This unlocks so much. With the blog being React, I can add MDX — interactive widgets &lt;em&gt;inside&lt;/em&gt; posts. Imagine a post about sorting algorithms where you can &lt;em&gt;drag the array elements&lt;/em&gt;. That&apos;s the post I&apos;m writing next. The friction is gone now; the writing starts for real.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;— Olav&lt;/em&gt;&lt;/p&gt;</content:encoded></item></channel></rss>