<?xml version="1.0" encoding="utf-8" standalone="yes"?><feed xmlns="http://www.w3.org/2005/Atom">
  <title></title>
  <subtitle></subtitle>
  <id>https://www.endpointdev.com/blog/tags/static-site-generator/</id>
  <link href="https://www.endpointdev.com/blog/tags/static-site-generator/"/>
  <link href="https://www.endpointdev.com/blog/tags/static-site-generator/" rel="self"/>
  <updated>2023-02-14T00:00:00+00:00</updated>
  <author>
    <name>End Point Dev</name>
  </author>
  
    <entry>
      <title>How to create a Hugo website without a theme</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/"/>
      <id>https://www.endpointdev.com/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/</id>
      <published>2023-02-14T00:00:00+00:00</published>
      <author>
        <name>Seth Jensen</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/light-through-tree.webp&#34; alt=&#34;A light shines through the branches of a tree, creating rays through the thick fog, and softly illuminating the building behind the tree. The smallest holes in the branches create lines of light showing the movement of the camera.&#34;&gt;&lt;/p&gt;
&lt;!-- Photo by Seth Jensen, 2023 --&gt;
&lt;p&gt;Since &lt;a href=&#34;/blog/2021/08/converting-to-hugo/&#34;&gt;converting this website&lt;/a&gt; to the Hugo static site generator a couple of years ago, I&amp;rsquo;ve used Hugo for lots of other projects. It&amp;rsquo;s blazing fast, simple, and makes small website projects much easier.&lt;/p&gt;
&lt;p&gt;One of the sites I&amp;rsquo;ve built with Hugo is a simple site to keep notes for my university classes. Hugo&amp;rsquo;s documentation tends to assume you&amp;rsquo;re using a theme, but for such a basic site using a theme would add unnecessary complexity I didn&amp;rsquo;t want to deal with. So, in this article I&amp;rsquo;ll show you how to create a site without a theme.&lt;/p&gt;
&lt;h3 id=&#34;creating-a-site&#34;&gt;Creating a site&lt;/h3&gt;
&lt;p&gt;First, &lt;a href=&#34;https://gohugo.io/installation/&#34;&gt;install Hugo&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to use &lt;a href=&#34;https://sass-lang.com/documentation/syntax&#34;&gt;SCSS&lt;/a&gt;, as I do in the example below, make sure to install the &amp;ldquo;extended&amp;rdquo; version of Hugo.&lt;/p&gt;
&lt;p&gt;Then, run the following command to create a Hugo site:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ hugo new site notes&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Get into the new &lt;code&gt;notes&lt;/code&gt; directory, and let&amp;rsquo;s edit the config file:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;baseURL = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;http://example.org/&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;languageCode = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;en-us&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;title = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Notes&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;pluralizelisttitles = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Other than the title, the only thing I changed here is disabling &lt;code&gt;pluralizelisttitles&lt;/code&gt;. Hugo expects you to name your sections something singular (e.g., put your blog posts in a &lt;code&gt;post&lt;/code&gt; directory), then automatically pluralizes the title when listing content in that section (&lt;code&gt;Posts&lt;/code&gt;). I prefer the singular for my university class names (Math 112 instead of Math 112s and so on).&lt;/p&gt;
&lt;h3 id=&#34;layout&#34;&gt;Layout&lt;/h3&gt;
&lt;p&gt;For a site as simple as ours, we only need a few layout files. Create a directory called &lt;code&gt;_default&lt;/code&gt; in the &lt;code&gt;layout&lt;/code&gt; directory, to put three files in: &lt;code&gt;baseof.html&lt;/code&gt;, &lt;code&gt;list.html&lt;/code&gt;, and &lt;code&gt;single.html&lt;/code&gt;. We&amp;rsquo;ll go through each of these files and what it does.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you need to add different templates for different sections, or if you&amp;rsquo;re curious about why we use &lt;code&gt;_default&lt;/code&gt; here, see Hugo&amp;rsquo;s &lt;a href=&#34;https://gohugo.io/templates/lookup-order/&#34;&gt;lookup order docs&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h4 id=&#34;baseofhtml&#34;&gt;baseof.html&lt;/h4&gt;
&lt;p&gt;Every page on the site looks for a base template, which we provide in &lt;code&gt;baseof.html&lt;/code&gt;. We&amp;rsquo;ll use it for the HTML boilerplate — &lt;code&gt;&amp;lt;!doctype html&amp;gt;&lt;/code&gt;, the &lt;code&gt;&amp;lt;html&amp;gt;&lt;/code&gt; tag, the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag with some logic for what to load, and the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt; tag with a &lt;a href=&#34;https://www.mikedane.com/static-site-generators/hugo/block-templates/&#34;&gt;block template&lt;/a&gt; for the page content.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#c00;font-weight:bold&#34;&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;html&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;charset&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;utf-8&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;meta&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;name&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;viewport&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;content&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;width=device-width, initial-scale=1&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;title&lt;/span&gt;&amp;gt;{{ or .Title .Site.Title }}{{ if ne .Kind &amp;#34;home&amp;#34; }} | {{ .CurrentSection.Title }}{{ end }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;title&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ $style := resources.Get &amp;#34;scss/style.scss&amp;#34; | toCSS | minify }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;link&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;rel&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;stylesheet&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ $style.RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;head&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ block &amp;#34;page&amp;#34; . }}{{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;html&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h4 id=&#34;listhtml&#34;&gt;list.html&lt;/h4&gt;
&lt;p&gt;The list template defines the layout for section list pages. Sections are defined by directories in the &lt;code&gt;content&lt;/code&gt; folder.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Read more about Sections in the &lt;a href=&#34;https://gohugo.io/content-management/sections/&#34;&gt;Hugo docs&lt;/a&gt;.&lt;/p&gt;&lt;/blockquote&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ define &amp;#34;page&amp;#34; }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;article&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;class&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;container&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {{ if ne .Kind &amp;#34;home&amp;#34; }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ .Site.Home.RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;Home&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h1&lt;/span&gt;&amp;gt;{{ .Title }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h1&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {{ range .Sections }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt;&amp;gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;{{ .Title }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ul&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ range .Pages }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;li&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;{{ or .Title .RelPermalink }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;li&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ul&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt;&amp;gt;Other&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ul&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ range .RegularPages }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;li&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ .RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;{{ or .Title .RelPermalink }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;li&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    {{ end }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ul&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;article&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ end }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here&amp;rsquo;s a breakdown of what&amp;rsquo;s going on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;We define the &lt;code&gt;page&lt;/code&gt; block we saw in the base template.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If we&amp;rsquo;re not on a &lt;code&gt;home&lt;/code&gt; page, we show a link to home.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;We range through every subsection of the current Section, listing all the pages for each.&lt;/p&gt;
&lt;p&gt;Note that in Hugo, everything is a Page, of varying types (like Section). A Section can have multiple subsections as well as Regular Pages, which are just Markdown files with some front matter. This allows us to list direct subsections alongside the Regular Pages for each section, while listing non-section Pages in our &amp;ldquo;Other&amp;rdquo; section. You can read about all the available Pages variables in &lt;a href=&#34;https://gohugo.io/variables/page/#pages&#34;&gt;Hugo&amp;rsquo;s docs&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Then, we list the Regular Pages of the current section.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&#34;singlehtml&#34;&gt;single.html&lt;/h4&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ define &amp;#34;page&amp;#34; }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;article&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;class&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;container&amp;#34;&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;href&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;{{ .CurrentSection.RelPermalink }}&amp;#34;&lt;/span&gt;&amp;gt;Back to {{ .CurrentSection.Title }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h1&lt;/span&gt;&amp;gt;{{ .Title }}&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h1&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  {{ .Content }}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;/&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;article&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ end }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This one&amp;rsquo;s simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define the same &lt;code&gt;page&lt;/code&gt; block — remember, the &lt;code&gt;list&lt;/code&gt; and &lt;code&gt;single&lt;/code&gt; templates both extend from the same &lt;code&gt;baseof&lt;/code&gt; template.&lt;/li&gt;
&lt;li&gt;Provide a link back to the current Section&amp;rsquo;s list page.&lt;/li&gt;
&lt;li&gt;Get the title from the page&amp;rsquo;s front matter.&lt;/li&gt;
&lt;li&gt;Show the content (here that means everything except the front matter) run through a Markdown parser.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;styling&#34;&gt;Styling&lt;/h3&gt;
&lt;p&gt;I prefer to style with SCSS, which Hugo supports with &lt;a href=&#34;https://gohugo.io/hugo-pipes/scss-sass/&#34;&gt;Pipes&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Because I&amp;rsquo;m using SCSS, I&amp;rsquo;ll put my styling in the &lt;code&gt;assets/scss&lt;/code&gt; directory (you&amp;rsquo;ll need to create it). If you want to use plain CSS, you could put it in a &lt;code&gt;static/css&lt;/code&gt; folder — everything in &lt;code&gt;static&lt;/code&gt; is copied to the build folder, preserving the existing structure. Then, you can link to it normally, without the Hugo Pipe I use for SCSS parsing.&lt;/p&gt;
&lt;p&gt;To keep it simple, my &lt;code&gt;style.scss&lt;/code&gt; is less than 100 lines long. Here&amp;rsquo;s part of it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-scss&#34; data-lang=&#34;scss&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#369&#34;&gt;$paradise-pink&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;#EA1F4B&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#369&#34;&gt;$paradise-pink-light&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;#EF5778&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;html&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;62&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.5&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;%&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;body&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.6&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;line-height&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.3&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h3&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h4&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h5&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h6&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;margin&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.8&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.6&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h1&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;3&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.2&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;h2&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.5&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;p&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ul&lt;/span&gt;, &lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;ol&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;font-size&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.8&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;margin&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;.8&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;em&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;a&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;text-decoration&lt;/span&gt;: none;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#369&#34;&gt;$paradise-pink&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;&amp;amp;&lt;/span&gt;&lt;span style=&#34;color:#555&#34;&gt;:hover&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#369&#34;&gt;color&lt;/span&gt;: &lt;span style=&#34;color:#369&#34;&gt;$paradise-pink-light&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;article&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;padding&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt; &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;max-width&lt;/span&gt;: &lt;span style=&#34;color:#06b;font-weight:bold&#34;&gt;calc&lt;/span&gt;(&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;44&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;em&lt;/span&gt; + &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;&lt;span style=&#34;color:#888;font-weight:bold&#34;&gt;rem&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#369&#34;&gt;margin&lt;/span&gt;: &lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;0&lt;/span&gt; auto;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;See &lt;a href=&#34;https://www.aleksandrhovhannisyan.com/blog/62-5-percent-font-size-trick/&#34;&gt;Aleksandr Hovhannisyan&amp;rsquo;s article&lt;/a&gt; for a good explanation of setting the &lt;code&gt;html&lt;/code&gt; font size to 62.5%.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h3 id=&#34;content&#34;&gt;Content&lt;/h3&gt;
&lt;p&gt;As I mentioned earlier, Hugo&amp;rsquo;s sections are defined by directories in the &lt;code&gt;content&lt;/code&gt; directory. Here&amp;rsquo;s what my notes look like after I organize them by university semester:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── content
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ├── _index.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    ├── winter-2022
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   ├── _index.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   ├── cs-235
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   │   ├── _index.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   │   ├── lecture-9.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   │   ├── lecture-10.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    │   │   └── quicksort-getting-started.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    └── winter-2023
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ├── _index.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        └── ec-en-240
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            ├── _index.md
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            └── lecture-01-09.md&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;a href=&#34;https://gohugo.io/variables/page/#pages&#34;&gt;&lt;code&gt;_index.md&lt;/code&gt;&lt;/a&gt; files are used to add frontmatter and content to list pages. In this site, I just use them to name my sections. If you don&amp;rsquo;t specify anything, it&amp;rsquo;ll use the directory name.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;title: Electrical and Computer Engineering 240
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And here&amp;rsquo;s one of those Markdown files; I&amp;rsquo;ll use &lt;code&gt;lecture-9.md&lt;/code&gt; as an example:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;title: &amp;#34;Lecture 9&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;date: 2022-02-01T09:39:28-07:00
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;katex: true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;`sumto()`&lt;/span&gt; function: \\(\sum_1^i i\\)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Can be done recursively: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;`sumto(5) = 5 + sumto(4)`&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Recursive function rules:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;1.&lt;/span&gt; have a base case (a case to stop the recursion)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;2.&lt;/span&gt; the recursive function must progress toward the base case (otherwise it will recurse infinitely)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;3.&lt;/span&gt; trust the induction
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;4.&lt;/span&gt; Make sure that it won&amp;#39;t make too many recursive calls
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;5. Never run the same arguments of the recursive function twice. Caching may help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You may notice a &lt;code&gt;katex: true&lt;/code&gt; key &amp;amp; value in the front matter. That&amp;rsquo;s an optional extra goody I&amp;rsquo;ve added, which we&amp;rsquo;ll go over soon!&lt;/p&gt;
&lt;h3 id=&#34;building-and-using-the-development-server&#34;&gt;Building and using the development server&lt;/h3&gt;
&lt;p&gt;To deploy the site to the &lt;code&gt;build&lt;/code&gt; directory, run:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ hugo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Or to use Hugo&amp;rsquo;s development server (one of its strongest features, in my opinion), go to the base site directory and start it:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ cd notes
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ hugo serve&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It will give you a localhost address with a port (&lt;code&gt;1313&lt;/code&gt; unless it&amp;rsquo;s taken by another service) that you can open in your browser of choice.&lt;/p&gt;
&lt;p&gt;Now you should have a shiny new Hugo site to work with, no theme required!&lt;/p&gt;
&lt;p&gt;Here&amp;rsquo;s the list page template in action:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/home.webp&#34; alt=&#34;A web browser open to localhost:39333, showing the home page of the notes site: A header reads &amp;ldquo;Notes&amp;rdquo;, followed by smaller headers. The first is pink, reading &amp;ldquo;Winter-2022&amp;rdquo;, with its own bulleted list containing the item &amp;ldquo;Lecture 9&amp;rdquo;, also in pink. The second is black and reads &amp;ldquo;Other&amp;rdquo;, with no list beneath it.&#34;&gt;&lt;/p&gt;
&lt;p&gt;And the single page template, plus our content file:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/lecture-9.webp&#34; alt=&#34;A web browser open to localhost:39333/winter-2022/cs-235/lecture-9/. At the top of the page is pink text (a link) reading &amp;ldquo;Back to Winter-2022&amp;rdquo;. Below is a header reading &amp;ldquo;Lecture 9&amp;rdquo;. Followed by the text of the lecture-9.md file. sumto() appears in an inline code block, as well as the later sumto()... text.&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;adding-katex-support&#34;&gt;Adding KaTeX support&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://katex.org/&#34;&gt;KaTeX&lt;/a&gt; is a lightweight JavaScript TeX implementation. I use enough math in my notes as an engineering student that I wanted an easy way to show math notation.&lt;/p&gt;
&lt;p&gt;Although I use math notation pretty often, I wanted to only load the JavaScript when necessary. For this, I set a front matter variable (&lt;code&gt;katex&lt;/code&gt;), and render a &lt;code&gt;katex.html&lt;/code&gt; partial in the site&amp;rsquo;s &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; if it&amp;rsquo;s there.&lt;/p&gt;
&lt;p&gt;Add the following to &lt;code&gt;baseof.html&lt;/code&gt;, in the &lt;code&gt;&amp;lt;head&amp;gt;&lt;/code&gt; tag:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{{ if .Params.katex }}{{ partial &amp;#34;partials/katex.html&amp;#34; . }}{{ end }}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;partial&lt;/code&gt; function takes a path relative to &lt;code&gt;layouts&lt;/code&gt;, so &lt;code&gt;partials/katex.html&lt;/code&gt; finds the file in &lt;code&gt;layouts/partials/katex.html&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Put the following in &lt;code&gt;layouts/partials/katex.html&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;link rel=&amp;#34;stylesheet&amp;#34; href=&amp;#34;/katex/katex.min.css&amp;#34;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script defer src=&amp;#34;/katex/katex.min.js&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;script defer src=&amp;#34;/katex/contrib/auto-render.min.js&amp;#34; onload=&amp;#34;renderMathInElement(document.body);&amp;#34;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I &lt;a href=&#34;https://katex.org/docs/browser.html#download--host-things-yourself&#34;&gt;downloaded&lt;/a&gt; KaTeX myself, which is nice for serving your own content while offline. But you could easily modify this partial to use CDN-hosted files.&lt;/p&gt;
&lt;p&gt;If you host the files yourself, just download and move the necessary files to &lt;code&gt;static/katex&lt;/code&gt;. You only need to keep a few files out of the ones KaTeX ships with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;└── static
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    └── katex
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ├── contrib
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   └── auto-render.min.js
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ├── fonts
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_AMS-Regular.ttf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_AMS-Regular.woff
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_AMS-Regular.woff2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_Caligraphic-Bold.ttf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_Caligraphic-Bold.woff
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_Caligraphic-Bold.woff2
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   ├── KaTeX_Caligraphic-Regular.ttf
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        │   └── … (more fonts here, not shown to save space)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        ├── katex.min.css
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        └── katex.min.js&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Remember that the contents of &lt;code&gt;static&lt;/code&gt; are directly copied to the build directory, so you don&amp;rsquo;t need to include &lt;code&gt;static/&lt;/code&gt; when referencing them in your templates.&lt;/p&gt;
&lt;p&gt;Now we can turn on the &lt;code&gt;katex&lt;/code&gt; switch and use math notation! The &lt;a href=&#34;https://katex.org/docs/autorender.html#api&#34;&gt;auto-render extension&lt;/a&gt; will, by default, look for blocks denoted by &lt;code&gt;\\(&lt;/code&gt; &lt;code&gt;\\)&lt;/code&gt;, or &lt;code&gt;$$&lt;/code&gt; &lt;code&gt;$$&lt;/code&gt; for bigger symbols and centered.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s make a new file in &lt;code&gt;content&lt;/code&gt; called &lt;code&gt;katex-test.md&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-markdown&#34; data-lang=&#34;markdown&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;title: &amp;#34;Some math notes&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;katex: true
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;---
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\\(
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\text{A system of } m \text{ equations in } n \text{ variables:}\\newline
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{1,1}x_1 + a_{1,2}x_2 + ... + a_{1,n}x_n = b_1\\newline
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{2,1}x_1 + a_{2,2}x_2 + ... + a_{2,n}x_n = b_2\\newline
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\vdots\\newline
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{m,1}x_1 + a_{m,2}x_2 + ... + a_{m,n}x_n = b_m
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\\)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;This one&amp;#39;s in &amp;#34;display mode&amp;#34; — centered, with larger symbols:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$$
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\begin{bmatrix}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{1,1} &amp;amp; a_{1,2} &amp;amp; ... &amp;amp; a_{1,n} &amp;amp; \mid b_1\\\\
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{2,1} &amp;amp; a_{2,2} &amp;amp; ... &amp;amp; a_{2,n} &amp;amp; \mid b_2\\\\
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\vdots\\\\
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;a_{m,1} &amp;amp; 1_{m,2} &amp;amp; ... &amp;amp; a_{m,n} &amp;amp; \mid b_m
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;\end{bmatrix}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$$&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;The highlighting here works fine, but it doesn&amp;rsquo;t work exactly how I&amp;rsquo;d expect. Markdown should always render first, then KaTeX should search for delimiters in the generated HTML, but the backslash behavior doesn&amp;rsquo;t seem consistent — I have to escape the backslash in &lt;code&gt;\newline&lt;/code&gt; or Markdown catches the &lt;code&gt;\n&lt;/code&gt;, but &lt;code&gt;\\(&lt;/code&gt; collapses to &lt;code&gt;\(&lt;/code&gt; and works fine, even with KaTeX looking for &lt;code&gt;\\(&lt;/code&gt; (which looks like &lt;code&gt;\\\\(&lt;/code&gt; when properly escaped in Markdown). Exploring that may be a topic for another blog post&amp;hellip;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Now you should be able to include math notation in your notes to your heart&amp;rsquo;s content!&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2023/02/how-to-create-a-hugo-website-without-a-theme/math-notes.webp&#34; alt=&#34;A web browser open to localhost:39333/katex-test/. At the top of the page is pink text (a link) reading &amp;ldquo;Back to Notes&amp;rdquo;. Below is a header reading &amp;ldquo;Some math notes&amp;rdquo;. Followed by the text of the katex-test.md file. Most of the text is rendered in a math font by KaTeX. The first block is left-justified, while the second is center-justified.&#34;&gt;&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Converting to Hugo</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2021/08/converting-to-hugo/"/>
      <id>https://www.endpointdev.com/blog/2021/08/converting-to-hugo/</id>
      <published>2021-08-23T00:00:00+00:00</published>
      <author>
        <name>Seth Jensen</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2021/08/converting-to-hugo/manhattan-view.jpg&#34; alt=&#34;A view of Manhattan from the Empire State Building&#34;&gt;&lt;/p&gt;
&lt;!-- Photo by Seth Jensen --&gt;
&lt;p&gt;We recently converted the End Point website from &lt;a href=&#34;https://middlemanapp.com/&#34;&gt;Middleman&lt;/a&gt; to &lt;a href=&#34;https://gohugo.io&#34;&gt;Hugo&lt;/a&gt;. I’ll go into more detail shortly, but the general result has been &lt;em&gt;much&lt;/em&gt; better build times with less configuration and better support for local development.&lt;/p&gt;
&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;
&lt;p&gt;In 2017 we converted this website from a Ruby on Rails app to a static site. With tons of high-quality static site generator options, we could implement the shiny features used by our &lt;a href=&#34;/blog/2009/10/new-end-point-site-rails-jquery-flot/&#34;&gt;Rails site in 2009&lt;/a&gt; with less overhead and quicker load times.&lt;/p&gt;
&lt;p&gt;We also wanted to move away from Blogger to self-hosting our blog, &lt;a href=&#34;/blog/2017/11/using-github-for-blog-comments/&#34;&gt;using GitHub issues for comments&lt;/a&gt;. We ended up switching to Middleman, a static site generator written in Ruby, and had a mostly positive experience. Ruby was a good fit switching from Rails, and (if I remember correctly) Middleman had pretty competitive performance.&lt;/p&gt;
&lt;p&gt;With over 1000 blog posts at the time, as well as lots of other pages, our site was quite slow to build—3.5 minutes when building with the full blog.&lt;/p&gt;
&lt;p&gt;Middleman had a nice development server, but due to some server-side rewrites, we couldn&amp;rsquo;t use it. Instead, we got around the build times by writing a simple Ruby script to generate an HTML preview, letting our blog authors see what their post would look like, more or less. This worked okay, but was not 100% accurate and made copy-editing and formatting slower than it needed to be for us &amp;ldquo;Keepers of the Blog&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;We started hiding most of the blog from Middleman while building to save time, but build times were still 40 seconds or more. With our patience for long build times waning, as well as Middleman losing most of its support in the development and user community, we decided to get in the market for a new site generator.&lt;/p&gt;
&lt;h3 id=&#34;shopping-around&#34;&gt;Shopping around&lt;/h3&gt;
&lt;p&gt;Before we (🚨 spoiler alert 🚨) settled on Hugo, we tried using &lt;a href=&#34;https://www.getzola.org/&#34;&gt;Zola&lt;/a&gt;, a site generator written in Rust and boasting tiny build times. Zola is a small project, and would have worked fairly well for us, but it had several downsides.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Initial build times were very promising, but slowed down more than expected after adding our now more than 1500 blog posts. We still ended up with very respectable build times of less than 15 seconds.&lt;/li&gt;
&lt;li&gt;As far as I could tell, Zola would have required an &lt;code&gt;_index.md&lt;/code&gt; file in every section and subsection, to hold section settings or to make it a transparent section, passing its files to the parent section. I didn&amp;rsquo;t like the sound of having a couple hundred extra Markdown files, one for every blog year and month.&lt;/li&gt;
&lt;li&gt;At the time of writing, Zola doesn&amp;rsquo;t support custom taxonomy paths. That means we would have our blog tags at &lt;code&gt;www.endpointdev.com/tags/&lt;/code&gt;, instead of our existing (and preferred) &lt;code&gt;www.endpointdev.com/blog/tags/&lt;/code&gt;. This has been &lt;a href=&#34;https://zola.discourse.group/t/custom-path-for-taxonomy-pages/82&#34;&gt;discussed&lt;/a&gt; on Zola forums, but seems to have stalled. This wasn&amp;rsquo;t a complete dealbreaker, but it was disappointing.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;making-the-switch-to-hugo&#34;&gt;Making the switch to Hugo&lt;/h3&gt;
&lt;p&gt;We wanted to see if there was another option which solved our issues with Zola. I decided to try Hugo. It&amp;rsquo;s written in Go and is currently one of the most popular static site generators.&lt;/p&gt;
&lt;p&gt;I partially converted the site and blog, and found that Hugo solved our main concerns with Zola:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Build times were close to twice as fast as Zola.&lt;/li&gt;
&lt;li&gt;You can dump as many subdirectories as you want in each section, and they&amp;rsquo;ll still belong to the section but retain the original directory structure.&lt;/li&gt;
&lt;li&gt;Hugo supports custom taxonomy paths through its &lt;a href=&#34;https://gohugo.io/content-management/urls/&#34;&gt;permalinks&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We were also able to shave off a lot of build time by analyzing our &lt;a href=&#34;https://gohugo.io/troubleshooting/build-performance/&#34;&gt;template metrics&lt;/a&gt;—this is one of my favorite features in Hugo.&lt;/p&gt;
&lt;h4 id=&#34;local-development&#34;&gt;Local development&lt;/h4&gt;
&lt;p&gt;So far, we&amp;rsquo;ve had extremely smooth local development. Hugo (like Zola) comes as a standalone single executable, so it&amp;rsquo;s extremely easy to get started or update. This was a huge improvement over Middleman, which required a heap of Ruby gems and plugins. Now every blog author can easily clone our repo, run the development server, and edit their post directly, with the full site building in anywhere from ~10 seconds all the way down to ~2 seconds, depending on the author&amp;rsquo;s machine.&lt;/p&gt;
&lt;p&gt;For blog authors, we were using a fork of an abandoned Middleman plugin. With Hugo, we&amp;rsquo;re using their taxonomies, which have been fairly easy to set up. We were also able to use Hugo&amp;rsquo;s built-in Chroma highlighter, instead of loading and running highlight.js on every blog page.&lt;/p&gt;
&lt;h4 id=&#34;some-drawbacks&#34;&gt;Some drawbacks&lt;/h4&gt;
&lt;blockquote&gt;
&lt;p&gt;July 2025 Update: Hugo has seen a lot of development since this post was written in 2021. I&amp;rsquo;ve added Wayback Machine links so the references are historical, but these examples are out of date now. From my usage in the past few years, the documentation has improved quite a bit.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;We&amp;rsquo;re loving the wonderfully fast build times and easy local development. I like the templating fairly well, and the simple configuration is wonderful. But Hugo does have several issues and missing features I&amp;rsquo;d like to see.&lt;/p&gt;
&lt;p&gt;One place Zola wins over Hugo is the ability to easily print the &lt;a href=&#34;https://www.getzola.org/documentation/templates/overview/&#34;&gt;entire context&lt;/a&gt; in a big JSON object. It&amp;rsquo;s a bit hard to navigate, but in my experience much easier and clearer than Hugo, where I have to either try using &lt;code&gt;printf&lt;/code&gt; to display the context&amp;rsquo;s variables, or search through the documentation. This was one of my favorite ways to quickly debug and learn about the inner workings of Zola, and would be very welcome in Hugo as well, without needing to know &lt;a href=&#34;https://pkg.go.dev/fmt&#34;&gt;Go formatting width&lt;/a&gt; and the full shape of Hugo&amp;rsquo;s context object beforehand.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Joe Mooring, a Hugo developer, mentioned that you can print some things with &lt;a href=&#34;https://gohugo.io/functions/debug/dump/&#34;&gt;&lt;code&gt;debug.Dump&lt;/code&gt;&lt;/a&gt;. I tried passing the context with &lt;code&gt;{{ debug.Dump . }}&lt;/code&gt;, which worked well for seeing what context variables are available/​set.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Documentation is another area where Hugo struggles sometimes. Pages often don&amp;rsquo;t feel interconnected and examples are often lacking. Here are a few examples I encountered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The Hugo Pipes page &lt;a href=&#34;https://web.archive.org/web/20210728193528/https://gohugo.io/hugo-pipes/scss-sass/&#34;&gt;SASS/​SCSS&lt;/a&gt; shows how to transform Sass files to CSS, but did not link to the very useful &lt;a href=&#34;https://web.archive.org/web/20210617171030/https://gohugo.io/content-management/page-resources/&#34;&gt;Page Resources&lt;/a&gt; page. It turned out I just needed to link to &lt;code&gt;{{ $style.RelPermalink }}&lt;/code&gt;, but as a new user it wasn&amp;rsquo;t clear that the CSS file was considered a &lt;code&gt;Resource&lt;/code&gt;. Having more links to related pages or more examples could save a lot of headaches for newbies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://web.archive.org/web/20210322083411/https://gohugo.io/templates/lookup-order/#hugo-layouts-lookup-rules&#34;&gt;Lookup Order&lt;/a&gt; says under the &lt;code&gt;Layout&lt;/code&gt; section that it &amp;ldquo;can be set in page front matter,&amp;rdquo; but I had to look under &lt;a href=&#34;https://web.archive.org/web/20210620065133/https://gohugo.io/content-management/front-matter&#34;&gt;Front Matter&lt;/a&gt; to see that &lt;code&gt;layout&lt;/code&gt; is the key name. A small change, and didn&amp;rsquo;t take long to experiment and find out, but especially since YAML is case sensitive, having a link to the actual front matter key would be better.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Enabling custom outputs on a per-taxonomy basis does not seem to be possible. We want to generate Atom feeds for our blog tags, but not for our blog authors, both of which are taxonomies. As far as I can tell, we have to enable them both and live with the cruft of unnecessary blog author feeds being generated.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Joe also provided a solution to this problem: cascade the &lt;code&gt;outputs&lt;/code&gt; front matter field down from the taxonomy page (e.g., content/tags/_index.md) or from your site configuration.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://gohugo.io/configuration/cascade/&#34;&gt;https://gohugo.io/configuration/cascade/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://gohugo.io/content-management/front-matter/#cascade-1&#34;&gt;https://gohugo.io/content-management/front-matter/#cascade-1&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I tested this and it works like a charm.&lt;/p&gt;&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;onward-and-upward&#34;&gt;Onward and upward!&lt;/h3&gt;
&lt;p&gt;It may look (mostly) the same, but on our end it&amp;rsquo;s never been easier to write blog posts or update the website, thanks to Hugo and all its contributors!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Jamstack Conf Virtual 2020: Thoughts &amp; Highlights</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2020/06/jamstack-conf-virtual-may-2020/"/>
      <id>https://www.endpointdev.com/blog/2020/06/jamstack-conf-virtual-may-2020/</id>
      <published>2020-06-16T00:00:00+00:00</published>
      <author>
        <name>Greg Davidson</name>
      </author>
      <content type="html">
        &lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/conference.jpg&#34; alt=&#34;Conference&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;welcome-to-jamstack-conf-virtual-2020&#34;&gt;Welcome to Jamstack Conf Virtual 2020&lt;/h3&gt;
&lt;p&gt;Last week I attended &lt;a href=&#34;https://jamstackconf.com/2020/may/&#34;&gt;Jamstack Conf Virtual 2020&lt;/a&gt;. It had originally been slated to take place in London, UK but was later transformed into a virtual event in light of the COVID-19 pandemic. The conference began at 2pm London time (thankfully I double-checked this the night before!)—​6am for those of us in the Pacific Time Zone.&lt;/p&gt;
&lt;blockquote class=&#34;twitter-tweet&#34;&gt;&lt;p lang=&#34;en&#34; dir=&#34;ltr&#34;&gt;Up early for &lt;a href=&#34;https://twitter.com/hashtag/jamstackconf?src=hash&amp;amp;ref_src=twsrc%5Etfw&#34;&gt;#jamstackconf&lt;/a&gt; 😎☕️ &lt;a href=&#34;https://t.co/ydjvrHWCZH&#34;&gt;pic.twitter.com/ydjvrHWCZH&lt;/a&gt;&lt;/p&gt;— Greg Davidson (@syncopated) &lt;a href=&#34;https://twitter.com/syncopated/status/1265637434638778368?ref_src=twsrc%5Etfw&#34;&gt;May 27, 2020&lt;/a&gt;&lt;/blockquote&gt; &lt;script async src=&#34;https://platform.twitter.com/widgets.js&#34; charset=&#34;utf-8&#34;&gt;&lt;/script&gt;
&lt;p&gt;Before getting too much further I wanted to mention that if you are not familiar with the Jamstack, You can read more about it at &lt;a href=&#34;https://jamstack.org/&#34;&gt;jamstack.org&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To virtually participate in the conference we used an app called &lt;a href=&#34;https://hopin.com/&#34;&gt;Hopin&lt;/a&gt;. I had not heard of it before but was impressed with how well it worked. There were over 3000 attendees from 130+ countries one of the times I checked. &lt;a href=&#34;https://www.hawksworx.com/&#34;&gt;Phil Hawksworth&lt;/a&gt; was the Host/​MC for the event and did a great job. There were virtual spaces for the stage, sessions, expo (vendors), and networking. If you opted to, the networking feature paired you with a random attendee for a video chat. I’m not sure what I expected going into it but I thought it was fun. I met a fellow developer from the Dominican Republic. The experience was very similar though more serendipitous than the hallway track or lunch line at an in-person conference.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/phil-welcome.png&#34; alt=&#34;Phil Hawksworth welcoming the attendees&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;keynote&#34;&gt;Keynote&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/biilmann&#34;&gt;Matt Biilmann&lt;/a&gt; opened the conference with a keynote address about the challenges we face as a developer community trying to improve access to accurate, timely and locally relevant information to a global audience. Many billions of users with all kinds of devices and varying levels of connectivity. He moved on to share how Netlify is trying to enable developers to “build websites instead of infrastructure” and “ensure all the best practices become common practices” through features like git-based deployments, build plugins, and edge handlers (more on those later).&lt;/p&gt;
&lt;h3 id=&#34;state-of-the-jamstack-survey-results&#34;&gt;State of the Jamstack Survey results&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/laurie-voss-talk.png&#34; alt=&#34;Laurie Voss reporting findings from the Jamstack Survey 2020&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://seldo.com/&#34;&gt;Laurie Voss&lt;/a&gt; &lt;a href=&#34;https://slides.com/seldo/jamstack-survey-2020#/&#34;&gt;walked us through&lt;/a&gt; the results of the &lt;a href=&#34;https://www.netlify.com/blog/2020/05/27/state-of-the-jamstack-survey-2020-first-results/&#34;&gt;Jamstack Survey 2020&lt;/a&gt;. There were some interesting findings and surprises. Later on I read &lt;a href=&#34;https://seldo.com/posts/you-will-never-be-a-full-stack-developer/&#34;&gt;Laurie’s post&lt;/a&gt; (which Matt had mentioned in his talk) and found that very interesting as well.&lt;/p&gt;
&lt;h3 id=&#34;fireside-chat-with-harper-reed&#34;&gt;Fireside chat with Harper Reed&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/harper-phae-talk.png&#34; alt=&#34;Frances Berriman interviewed Harper Reed - fireside chat style&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://fberriman.com/&#34;&gt;Frances Berriman&lt;/a&gt; chatted with &lt;a href=&#34;https://harperreed.com/&#34;&gt;Harper Reed&lt;/a&gt; and asked him about his application of Jamstack principles from years ago when he led the technology team for Barack Obama’s election campaign. He described the need to “get far with very limited resources” and spoke about experimenting with serving HTML from Google App Engine and Amazon S3. Using pre-built HTML allowed them to scale very efficiently and he opted to use message queues rather than interacting with the database to keep things very quick for users.&lt;/p&gt;
&lt;p&gt;Another benefit Harper noted was how quickly and easily new team members could be onboarded. Folks who knew HTML, CSS and JavaScript would be up to speed and productive in no time. He admitted it’s more complicated today 😀. Speed is another benefit—he just loves when he comes across a super-fast web site (often mostly static).&lt;/p&gt;
&lt;h3 id=&#34;lightning-launch-netlify-&#34;&gt;Lightning Launch: Netlify ⚡&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/calavera&#34;&gt;David Calavera&lt;/a&gt; gave a demo of Netlify’s new Edge Handlers feature which lets developers add logic to their code at the edge (e.g. the CDN servers geographically closest to the user). He demonstrated how Edge Handlers make it possible to examine the headers of the request to tailor the response to that unique request. Check out the &lt;a href=&#34;https://www.youtube.com/watch?v=D44n8YVb5iI&#34;&gt;video of his talk&lt;/a&gt; to watch him live code an example. I believe &lt;a href=&#34;https://workers.cloudflare.com/&#34;&gt;Cloudflare Workers&lt;/a&gt; and Fastly’s &lt;a href=&#34;https://www.fastly.com/products/edge-compute/serverless&#34;&gt;Edge Compute&lt;/a&gt; are operating in a similar problem space. I plan to look into each of these offerings more thoroughly in future.&lt;/p&gt;
&lt;h3 id=&#34;lightning-launch-prismic-&#34;&gt;Lightning Launch: Prismic ⚡&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/RenaudBressand&#34;&gt;Renaud Bressand&lt;/a&gt; from Prismic demoed &lt;a href=&#34;https://www.slicemachine.dev/&#34;&gt;Slicemachine&lt;/a&gt;—​a new feature from Prismic which lets you combine &lt;a href=&#34;https://nuxtjs.org/&#34;&gt;nuxt&lt;/a&gt;/​Vue components with content managed in Prismic. It looked like a very compelling way of enabling better collaboration between developers and content creators.&lt;/p&gt;
&lt;h3 id=&#34;lightning-launch-redwoodjs-&#34;&gt;Lightning Launch: RedwoodJS ⚡&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://tom.preston-werner.com/&#34;&gt;Tom Preston-Werner&lt;/a&gt; demoed his latest project &lt;a href=&#34;https://redwoodjs.com/&#34;&gt;RedwoodJS&lt;/a&gt;. I had heard Tom speak about this on a few podcasts recently and it was nice to see him demo it for us. It looks interesting and feels reminiscent of &lt;a href=&#34;https://rubyonrails.org/&#34;&gt;Rails&lt;/a&gt;. RedwoodJS simplifies wiring up your database to a &lt;a href=&#34;https://graphql.org/&#34;&gt;GraphQL&lt;/a&gt; API (they use &lt;a href=&#34;https://www.prisma.io/&#34;&gt;Prisma&lt;/a&gt; for this) and integrating it into a React application. Tom is also the creator of &lt;a href=&#34;https://jekyllrb.com/&#34;&gt;Jekyll&lt;/a&gt;—​a Jamstack-style tool which has been around for many years. It was nice to see several speakers give him some recognition for his work on that project.&lt;/p&gt;
&lt;h3 id=&#34;the-covid-tracking-project-0-to-2m-api-requests-in-3-months&#34;&gt;The COVID Tracking Project: 0 to 2M API requests in 3 months&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/kissane.png&#34; alt=&#34;Erin Kissane presenting The COVID Tracking Project&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://incisive.nu/&#34;&gt;Erin Kissane&lt;/a&gt; gave an inspiring talk about her work on &lt;a href=&#34;https://covidtracking.com&#34;&gt;The COVID Tracking Project&lt;/a&gt;. She described it as an “interim public data rescue project”. Erin and some friends, journalists and volunteers worked together to create the site. They started by scraping COVID data from each state’s web site and storing it in a Google Sheet. They used &lt;a href=&#34;https://www.gatsbyjs.com/&#34;&gt;Gatsby&lt;/a&gt;, &lt;a href=&#34;https://www.contentful.com/&#34;&gt;Contentful&lt;/a&gt;, and &lt;a href=&#34;https://css-tricks.com/introducing-sass-modules/&#34;&gt;Sass modules&lt;/a&gt; and hosted the site on Netlify. Using the Jamstack approach allowed the site to remain performant and continue to be responsive under some huge traffic spikes. Over time, they iterated on the design and continue to improve the site daily. I highly recommend checking out the &lt;a href=&#34;https://www.youtube.com/watch?v=ryngYoHXNfQ&#34;&gt;video of the talk&lt;/a&gt; when you get a chance.&lt;/p&gt;
&lt;h3 id=&#34;jamstack-for-emerging-markets&#34;&gt;Jamstack for emerging markets&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://www.codebeast.dev/&#34;&gt;Christian Nwamba&lt;/a&gt; described some of the challenges of building sites for users in Nigeria (low power devices, spotty connectivity, unreliable power). He shared that 55% of the most visited sites in Nigeria are global companies (Google, Facebook/​Instagram, Netflix, Stack Overflow etc.). Christian reviewed a large, popular banking site in Nigeria and noted its many shortcomings.&lt;/p&gt;
&lt;p&gt;To demonstrate how the bank might do better he built &lt;a href=&#34;https://proud-flower-060c1e01e.azurestaticapps.net/&#34;&gt;an app&lt;/a&gt; for transferring money between friends &amp;amp; family built in the Jamstack style and using serverless functions. The most interesting thing I picked up from this was his method of using serverless functions to protect the app secrets (API keys, etc.). The front end of the application did not need to concern itself with this—​the serverless functions kept the secrets safe and acted as a proxy between the frontend and the backend APIs. Be sure to take a look at &lt;a href=&#34;https://github.com/christiannwamba/quickbank&#34;&gt;Christian’s code&lt;/a&gt; if you are interested.&lt;/p&gt;
&lt;h3 id=&#34;managing-diabetes-with-jamstack&#34;&gt;Managing diabetes with Jamstack&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://jamiebradley.dev/&#34;&gt;Jamie Bradley&lt;/a&gt; taught us about diabetes and the Jamstack app he built to help himself and others manage it. He built &lt;a href=&#34;https://heysugar.health/&#34;&gt;HeySugar&lt;/a&gt; with Gatsby and Sanity, hosted it on Netlify. He’s making it easier for others to deploy their own instances as well.&lt;/p&gt;
&lt;h3 id=&#34;selling-tickets-without-servers-or-frameworks-or-cookies&#34;&gt;Selling tickets without servers. Or frameworks. Or cookies.&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://jvhellemond.nl/&#34;&gt;Jan van Hellemond&lt;/a&gt; has volunteered for years at a very popular conference in Europe (&lt;a href=&#34;https://fronteers.nl/congres&#34;&gt;Fronteers&lt;/a&gt; I think). In previous years tickets sold out in 6 minutes one year, and 30 seconds in another! Their ticket vendor was struggling to handle to the load and this caused them to oversell early bird tickets. Jan built a Jamstack site to sell their tickets and was very pleased with the performance. He used simple, single-purpose vanilla JavaScript components and simple, single-purpose API handlers (serverless functions).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/tickets.png&#34; alt=&#34;Jan presenting his Jamstack ticket selling app&#34;&gt;&lt;/p&gt;
&lt;p&gt;Jan prerendered as much as possible and seeded a relational database with the tickets available for sale. As the tickets were sold, they were marked sold with a database update. Webhooks were used as customers stepped through the checkout flow. Jan joked about deploying to production on a Friday afternoon because of how safe and simple the deployment process was. There were no services to restart, etc. because “it’s just files”. It was cool to see a practical example and that Jan used the basic building blocks of the web (HTML, JavaScript, CSS, old school links) successfully without reaching for a large JavaScript framework.&lt;/p&gt;
&lt;h3 id=&#34;the-business-side-of-the-jamstack&#34;&gt;The business side of the Jamstack&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/_anarossetto_&#34;&gt;Ana Rossetto&lt;/a&gt; shared how her company has been having great success with the Jamstack. Previously, the agency had been building projects for clients with Drupal. She walked through a project she and the team built to encourage people to buy from small, locally-owned businesses. She was impressed with what they were able to create in a very short amount of time.&lt;/p&gt;
&lt;h3 id=&#34;build-plugin-authors-session&#34;&gt;Build plugin authors’ session&lt;/h3&gt;
&lt;p&gt;After the main talks there were several sessions. In the Hopin app, I was able to peek into some of these and the presenters and attendees were chatting (both text chat and video). This was very much like the experience of peeking into conference rooms at a physical venue and choosing whether to stay and participate or move on. After some wandering I chose to attend a session with three Netlify build plugin authors.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;/blog/2020/06/jamstack-conf-virtual-may-2020/subfont.png&#34; alt=&#34;Peter telling us about subfont&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://mntr.dk/&#34;&gt;Peter Müller&lt;/a&gt; built &lt;a href=&#34;https://github.com/Munter/netlify-plugin-subfont&#34;&gt;Subfont&lt;/a&gt; with a friend. He demonstrated how subsetting web fonts (i.e. only loading the characters &amp;amp; glyphs you really need) can dramatically improve frontend performance. He compared the &lt;a href=&#34;https://webpagetest.org/&#34;&gt;WebPageTest&lt;/a&gt; results for Google Fonts with and without Subfont and Subfont was seconds faster! I have subset and locally hosted webfonts in several client projects here at End Point. It takes time and is a manual process. Peter’s plugin makes this excellent performance improvement relatively painless.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://darn.es/&#34;&gt;David Darnes&lt;/a&gt; demoed his build plugin to &lt;a href=&#34;https://github.com/daviddarnes/netlify-plugin-ghost-markdown&#34;&gt;turn Ghost content into Markdown files&lt;/a&gt;. Very interesting and it seemed flexible enough to work with other tools as well.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://twitter.com/bahmutov&#34;&gt;Gleb Bahmutov&lt;/a&gt; presented the build plugin he created to run &lt;a href=&#34;https://www.cypress.io/&#34;&gt;Cypress&lt;/a&gt; tests as part of your Netlify build process. It was amazing to see how simple it was (single devDependency and single line in the netlify.toml config file).&lt;/p&gt;
&lt;h3 id=&#34;videos-from-the-conference&#34;&gt;Videos from the conference&lt;/h3&gt;
&lt;p&gt;Netlify has already put all of the &lt;a href=&#34;https://www.youtube.com/playlist?list=PL58Wk5g77lF8jzqp_1cViDf-WilJsAvqT&#34;&gt;Jamstack Conf Virtual 2020 talks&lt;/a&gt; on YouTube so head over there and check those out if you’d like to. Thanks very much to the team at Netlify for organizing the conf, all of the speakers, vendors and attendees!&lt;/p&gt;

      </content>
    </entry>
  
    <entry>
      <title>Using GitHub for Blog Comments</title>
      <link rel="alternate" href="https://www.endpointdev.com/blog/2017/11/using-github-for-blog-comments/"/>
      <id>https://www.endpointdev.com/blog/2017/11/using-github-for-blog-comments/</id>
      <published>2017-11-14T00:00:00+00:00</published>
      <author>
        <name>Phineas Jensen</name>
      </author>
      <content type="html">
        &lt;p&gt;Last Saturday, November 11, we rolled out a new website that we’ve been working on for a few months. Part of this update was moving from Blogger as our blogging platform to static HTML generated by &lt;a href=&#34;https://middlemanapp.com&#34;&gt;Middleman&lt;/a&gt;. We were more than happy to move away from Blogger for a variety of reasons, including its lack of HTTPS support for custom domains and how difficult it was to keep its templating and styling up to date with our main website. We were also able to move from blog.endpoint.com to www.endpoint.com/blog.&lt;/p&gt;
&lt;p&gt;The most obvious thing that is missing from Middleman’s blog extension is the lack of a commenting system. After exploring some options for comments, we settled on using GitHub issues and comments, inspired by &lt;a href=&#34;http://donw.io/post/github-comments/&#34;&gt;Don Williamson’s post&lt;/a&gt; about doing the same thing. It’s a bit of an unconventional approach, so this post will explain how to use our commenting system and how we implemented it.&lt;/p&gt;
&lt;p&gt;Commenting requires a GitHub account, which is easy to sign up for and free, and the general target audience of our blog will often already have a GitHub account. At the bottom of each post will be a link to a GitHub issue at the top of the list of comments, if there are any. Click on the issue, write and post your comment, and it’ll appear on the blog post when you reload the page. It’s pretty simple.&lt;/p&gt;
&lt;p&gt;Now, for the gritty details. Don’s post shows the JavaScript he uses to find the correct GitHub issue and fetch its comments, but it required a bit of modification to work in our Middleman project. First, we needed a way to get the right GitHub issue number. Don’s example has that worked into the JavaScript with Hugo, fetching it from some parameter value, but I opted to create a hidden input on the page that would provide the right number:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-html&#34; data-lang=&#34;html&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&amp;lt;&lt;span style=&#34;color:#b06;font-weight:bold&#34;&gt;input&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;type&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;hidden&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;name&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;gh_issue&amp;#34;&lt;/span&gt; &lt;span style=&#34;color:#369&#34;&gt;value&lt;/span&gt;=&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;%= current_page.data.gh_issue_number =&amp;gt;&amp;#34;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Or in HAML:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;%input{type: &amp;#34;hidden&amp;#34;, name: &amp;#34;gh_issue&amp;#34;, value: current_page.data.gh_issue_number}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we can fetch that value with jQuery:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; issue_id = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;[name=&amp;#34;gh_issue&amp;#34;]&amp;#39;&lt;/span&gt;).val();&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;From there, we just had to modify the IDs referenced in Don’s JavaScript to match ours, and comments were working perfectly! Well, new comments were.&lt;/p&gt;
&lt;p&gt;Our blog is over 9 years old now, with over 1,300 posts and comments on many of those, and we needed to pull those existing comments over into GitHub as well. Actually copying the data wasn’t too difficult. I wrote a simple Python script to use the Blogger API to fetch posts and their comments, sort them by date, create an appropriately-named GitHub issue, and add the comments to them. Aside from GitHub’s anti-abuse detection system getting in the way a few times, it was an easy process.&lt;/p&gt;
&lt;p&gt;We wanted to preserve original author and timestamp information, so I had my script prepend the comment body with that information in a code block so it could be easily read by people reading comments on GitHub and parsed by JavaScript:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-plain&#34; data-lang=&#34;plain&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;original author: ...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;date: ...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To parse that out, I wrote a quick and dirty regex that runs if I’m the user who created the comment:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (data.user.login == &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;phinjensen&amp;#34;&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; regex = &lt;span style=&#34;color:#080;background-color:#fff0ff&#34;&gt;/^```\r?\noriginal author: ([^\r\n]+)\r?\ndate: ([^\r\n]+)\r?\n```/&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; info = data.body.match(regex);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (info) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    author_name = info[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    date = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;Date&lt;/span&gt;(info[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    data.body_html = data.body_html.replace(&lt;span style=&#34;color:#080;background-color:#fff0ff&#34;&gt;/^&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;.+\r?\n.+\r?\n&amp;lt;\/code&amp;gt;&amp;lt;\/pre&amp;gt;/&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If that regex isn’t matched, then the author and date data is left as-is and parsed as normal. Here’s the full JavaScript we’re using:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; formatDate(date) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; monthNames = [
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;January&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;February&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;March&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;April&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;May&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;June&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;July&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;August&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;September&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;October&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;November&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;December&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  ];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; day = date.getDate();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; monthIndex = date.getMonth();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; year = date.getFullYear();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;return&lt;/span&gt; monthNames[monthIndex] + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39; &amp;#39;&lt;/span&gt; + day + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;, &amp;#39;&lt;/span&gt; + year;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$(&lt;span style=&#34;color:#038&#34;&gt;document&lt;/span&gt;).ready(&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt; () {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; issue_id = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;[name=&amp;#34;gh_issue&amp;#34;]&amp;#39;&lt;/span&gt;).val();
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; url = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;https://github.com/EndPointCorp/end-point-blog/issues/&amp;#34;&lt;/span&gt; + issue_id
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;	&lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; api_url = &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;https://api.github.com/repos/EndPointCorp/end-point-blog/issues/&amp;#34;&lt;/span&gt; + issue_id + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;/comments&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  $.ajax(api_url, {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    headers: { Accept: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;application/vnd.github.v3.full+json&amp;#34;&lt;/span&gt; },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    dataType: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;json&amp;#34;&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    success: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;(comments) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.comments&amp;#34;&lt;/span&gt;).append(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Visit the &amp;lt;b&amp;gt;&amp;lt;a href=&amp;#39;&amp;#34;&lt;/span&gt; + url + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;#39;&amp;gt;GitHub Issue&amp;lt;/a&amp;gt;&amp;lt;/b&amp;gt; to comment on this post.&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      $.each(comments, &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;(i, data) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; date, author_name;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (data.user.login == &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;phinjensen&amp;#34;&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; regex = &lt;span style=&#34;color:#080;background-color:#fff0ff&#34;&gt;/^```\r?\noriginal author: ([^\r\n]+)\r?\ndate: ([^\r\n]+)\r?\n```/&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; info = data.body.match(regex);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (info) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            author_name = info[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;1&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            date = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;Date&lt;/span&gt;(info[&lt;span style=&#34;color:#00d;font-weight:bold&#34;&gt;2&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            data.body_html = data.body_html.replace(&lt;span style=&#34;color:#080;background-color:#fff0ff&#34;&gt;/^&amp;lt;pre&amp;gt;&amp;lt;code&amp;gt;.+\r?\n.+\r?\n&amp;lt;\/code&amp;gt;&amp;lt;\/pre&amp;gt;/&lt;/span&gt;, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;&amp;#39;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (!date) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          date = &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;new&lt;/span&gt; &lt;span style=&#34;color:#038&#34;&gt;Date&lt;/span&gt;(data.created_at);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; $comment = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;div/&amp;gt;&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;comment&amp;#39;&lt;/span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (!author_name) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          $comment.append($(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;img/&amp;gt;&amp;#34;&lt;/span&gt;, {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;src&amp;#39;&lt;/span&gt;: data.user.avatar_url,
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;avatar-image&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          }));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; $body = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;div/&amp;gt;&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;comment-body&amp;#39;&lt;/span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;var&lt;/span&gt; $header = $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;span/&amp;gt;&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;comment-header&amp;#39;&lt;/span&gt;});
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;if&lt;/span&gt; (author_name) {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          $header.append(author_name);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        } &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;else&lt;/span&gt; {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          $header.append($(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;a/&amp;gt;&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;href&amp;#39;&lt;/span&gt;: data.user.html_url, &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;text&amp;#39;&lt;/span&gt;: data.user.login}));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        $header.append(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34; commented on &amp;#34;&lt;/span&gt; + formatDate(date));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        $body.append($header);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        $body.append($(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;div&amp;gt;&amp;#34;&lt;/span&gt; + data.body_html + &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;&amp;lt;/div&amp;gt;&amp;#34;&lt;/span&gt;, {&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;class&amp;#39;&lt;/span&gt;: &lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#39;comment-body&amp;#39;&lt;/span&gt;,}));
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        $comment.append($body);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.comments&amp;#34;&lt;/span&gt;).append($comment);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    },
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    error: &lt;span style=&#34;color:#080;font-weight:bold&#34;&gt;function&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      $(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;.comments&amp;#34;&lt;/span&gt;).append(&lt;span style=&#34;color:#d20;background-color:#fff0f0&#34;&gt;&amp;#34;Comments are not open for this post yet.&amp;#34;&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;});&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Huge thanks to &lt;a href=&#34;http://donw.io/&#34;&gt;Don Williamson&lt;/a&gt; for sharing his implementation of this idea! If you have any feedback for us and how we’re doing it, let us know in the comments!&lt;/p&gt;

      </content>
    </entry>
  
</feed>
