<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Blog on Drew Herron</title><link>https://www.drewherron.com/blog/</link><description>Recent content in Blog on Drew Herron</description><generator>Hugo</generator><language>en-us</language><managingEditor>dherron@mailbox.org (Drew Herron)</managingEditor><webMaster>dherron@mailbox.org (Drew Herron)</webMaster><lastBuildDate>Thu, 20 Aug 2026 16:09:00 -0700</lastBuildDate><atom:link href="https://www.drewherron.com/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>A new Hugo theme</title><link>https://www.drewherron.com/blog/custom-hugo-theme/</link><pubDate>Thu, 20 Aug 2026 16:09:00 -0700</pubDate><author>dherron@mailbox.org (Drew Herron)</author><guid>https://www.drewherron.com/blog/custom-hugo-theme/</guid><description>&lt;p&gt;My site is built using &lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;. Hugo has a wide range of themes available, which you can browse and preview at their &lt;a href="https://themes.gohugo.io/"&gt;theme gallery&lt;/a&gt;. So which Hugo theme am I using? None.&lt;/p&gt;
&lt;h2 id="how-hugo-themes-work"&gt;How Hugo themes work&lt;/h2&gt;
&lt;p&gt;Hugo is really two stacked things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The plumbing: content model, Markdown/org rendering, taxonomies,
pagination, RSS/sitemap/robots (these are internal Hugo templates,
free), the asset pipeline, fast rebuilds, and (in my case) the
ox-hugo bridge from org-mode.&lt;/li&gt;
&lt;li&gt;The theme: just layout templates. The style.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Instead of creating a true custom theme, which is a full package that
could be shared on Hugo&amp;rsquo;s theme page (and would need to be
indefinitely maintained and guaranteed portable), I&amp;rsquo;m taking a
different route, and I&amp;rsquo;m explaining it here in case someone (you)
might want to adopt the same plan for your own site.&lt;/p&gt;</description><content:encoded><![CDATA[<p>My site is built using <a href="https://gohugo.io/">Hugo</a>. Hugo has a wide range of themes available, which you can browse and preview at their <a href="https://themes.gohugo.io/">theme gallery</a>. So which Hugo theme am I using? None.</p>
<h2 id="how-hugo-themes-work">How Hugo themes work</h2>
<p>Hugo is really two stacked things:</p>
<ol>
<li>The plumbing: content model, Markdown/org rendering, taxonomies,
pagination, RSS/sitemap/robots (these are internal Hugo templates,
free), the asset pipeline, fast rebuilds, and (in my case) the
ox-hugo bridge from org-mode.</li>
<li>The theme: just layout templates. The style.</li>
</ol>
<p>Instead of creating a true custom theme, which is a full package that
could be shared on Hugo&rsquo;s theme page (and would need to be
indefinitely maintained and guaranteed portable), I&rsquo;m taking a
different route, and I&rsquo;m explaining it here in case someone (you)
might want to adopt the same plan for your own site.</p>
<h2 id="this-current-theme">This current &ldquo;theme&rdquo;</h2>
<p>My plan hinges on one aspect of Hugo&rsquo;s functionality: the local
project-root <code>layouts/</code> overrides the theme&rsquo;s <code>layouts/</code>. This means
you can write your own templates one file at a time while the theme
stays installed, and each file silently takes over that page type. You
also don&rsquo;t need a template for every page type - Hugo has a fallback
chain, and the minimal complete set is just <code>_default/baseof.html</code>,
<code>_default/single.html</code>, <code>_default/list.html</code>, <code>index.html</code>, and
<code>404.html</code>.</p>
<p>Start with those, and then each other component of the layout can be
replaced, one by one, tweaking to the result you want on your own
site. Eventually, when every single thing has been replaced, you can
just delete the entire theme line from <code>hugo.toml</code>. At that point,
everything is coming from your own collection of layout files, and
they form your custom theme.</p>
<p>A true theme is more than just layouts, it can inject assets/,
static/, default params, i18n/, and archetypes/. Those still merge
even when the layouts are fully shadowed. So if you don&rsquo;t want those
from the theme, you will need to do the full removal, deleting that
theme line from <code>hugo.toml</code>. And to get there, you need your own
templates covering every page type your site actually produces - not
necessarily every template the theme ships, since it probably includes
layouts for page types you&rsquo;ll never use.</p>
<p>So here&rsquo;s my basic workflow in creating this current &ldquo;theme&rdquo;:</p>
<p>Start with a basic theme. The more complete the theme, the more of
your site&rsquo;s behavior hides inside the theme&rsquo;s files instead of yours -
so when you finally remove it, you&rsquo;ll discover it was doing more than
you realized. I started with <a href="https://github.com/clente/hugo-bearcub">hugo-bearcub</a>. I tweaked each aspect of
the theme using my own file in <code>layouts/</code> until I no longer needed
that theme, and I deleted the <code>theme = 'hugo-bearcub'</code> line in
<code>hugo.toml</code>.</p>
<p>You might expect at least one surprise when you do. In my case the
theme had been quietly supplying <code>robots.txt</code> - with a <code>Sitemap:</code> line
in it - and Hugo&rsquo;s built-in version has neither. Nothing looked
broken, because nothing <em>looked</em> like anything; it was a file I&rsquo;d
never written and didn&rsquo;t know I was relying on. Part of the argument
for doing the removal instead of just shadowing the layouts and
calling it done.</p>
<p>Then I browsed around Hugo&rsquo;s theme gallery for the more feature-rich
themes, looking for specific things I&rsquo;d want to incorporate into my
own site. When I found something, I edited/created a file in my own
project-root <code>layouts/</code> directory, and magically that
feature/component shows up in my own site.</p>
<p>Hope that&rsquo;s helpful for anyone wanting to get a custom look on their
Hugo site.</p>
]]></content:encoded></item><item><title>A new website</title><link>https://www.drewherron.com/blog/a-new-website/</link><pubDate>Mon, 17 Aug 2026 22:59:00 -0700</pubDate><author>dherron@mailbox.org (Drew Herron)</author><guid>https://www.drewherron.com/blog/a-new-website/</guid><description>&lt;p&gt;I&amp;rsquo;ve owned this domain for a long time, and over the years the site
has gone through a few iterations. I always spent my effort on things
like impressive design, interesting animations, etc., but never on
content. The site would consist of nothing more than a few links,
maybe with some kind of &amp;ldquo;under construction&amp;rdquo; message. Well, I&amp;rsquo;ve
finally got around to the construction.&lt;/p&gt;
&lt;p&gt;Eventually, I expect much of the usefulness of this site will be found
in utilities and projects in the subdomains. Because this is hosted on
GitHub Pages, those will need to run on other servers. For now this is
just the static base site. I have the domain, may as well finally use
it.&lt;/p&gt;</description><content:encoded><![CDATA[<p>I&rsquo;ve owned this domain for a long time, and over the years the site
has gone through a few iterations. I always spent my effort on things
like impressive design, interesting animations, etc., but never on
content. The site would consist of nothing more than a few links,
maybe with some kind of &ldquo;under construction&rdquo; message. Well, I&rsquo;ve
finally got around to the construction.</p>
<p>Eventually, I expect much of the usefulness of this site will be found
in utilities and projects in the subdomains. Because this is hosted on
GitHub Pages, those will need to run on other servers. For now this is
just the static base site. I have the domain, may as well finally use
it.</p>
<p>I&rsquo;m also a big fan of simplicity in technology, so I don&rsquo;t mind a
simple static site. Filling it up with interesting content is the real
challenge.</p>
<h2 id="technical-details">Technical details</h2>
<p>Here&rsquo;s a description of the technical side of the site, for anyone
interested:</p>
<p>The stack is <a href="https://www.gnu.org/savannah-checkouts/gnu/emacs/emacs.html">Emacs</a> -&gt; <a href="https://ox-hugo.scripter.co/">ox-hugo</a> -&gt; <a href="https://themes.gohugo.io/">Hugo</a> -&gt; <a href="https://git-scm.com/">Git</a> -&gt; <a href="https://docs.github.com/en/pages">GitHub Pages</a>. If you
know what those are, then you already know what&rsquo;s coming.</p>
<p>I write the site, including these posts, with Emacs in Org mode
format. When I&rsquo;m done making changes, I can press an Emacs key
combination and the ox-hugo package compiles the file into markdown
for Hugo. The directory is a git repository, and when I commit and
push my changes GitHub Actions automatically updates the page on
GitHub Pages.</p>
<p>This makes writing new content an extremely simple process, basically
just editing a plain text file. Each Org heading is its own post,
subheadings become sections. Marking the heading <code>DONE</code> will include
the post in the next export. I can commit with <a href="https://magit.vc/">magit</a>, so I never even
have to leave Emacs. The Org tree of this current post looks like
this:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-org" data-lang="org"><span class="line"><span class="cl"><span class="gh">*</span><span class="sr"> DONE</span><span class="gs"> A new website :hugo:emacs:org:web:@Technology:</span>
</span></span><span class="line"><span class="cl"><span class="c">  CLOSED: </span><span class="cs">[2026-07-19 Sun 00:23]</span>
</span></span><span class="line"><span class="cl">  :PROPERTIES: :EXPORT_FILE_NAME: a-new-website :EXPORT_DESCRIPTION:
</span></span><span class="line"><span class="cl">  What am I doing here?  :END: (content) ** Technical details
</span></span><span class="line"><span class="cl">  (content) ** Blog (content)
</span></span></code></pre></div><p>So guess what comes next?</p>
<h2 id="blog">Blog</h2>
<p>I generally don&rsquo;t use social media, I may have accounts but I never
check them. If I have anything interesting to write, I now have this
blog. This will be a good place to put the things I think or learn
about computers/data/AI/etc. I may be unemployed, but technology is my
profession and so that&rsquo;s what I will focus on. I haven&rsquo;t decided how
far posts may occasionally stray from technology, we&rsquo;ll find out as
time goes on. In any case, this is an informal personal site. It won&rsquo;t
be the kind of content you might find in a newsletter on any specific
topic.</p>
]]></content:encoded></item></channel></rss>