I’ve had this blog for a while, but I haven’t updated it often. I haven’t figured out a good way to motivate myself to write blog posts. I’m going to try to get myself working on this again, but this time I’ve got a better idea of what I want to get out of it: more social interaction, and specifically of the nerdy kind. One of the realizations I’ve had is that I’m highly motivated by people responding to something I’ve made, whether it’s writing, a game, artwork, or just a freaking chat message. Maybe I’m just tired of being a hermit?

So this is my current goal: get people responding to my blog. I’ve started by procrastinating modernizing my site and improving my tooling. This has at least gotten me to start drafting blog posts. Here’s what I’ve done:

Added Better favicon support

This was a more spur of the moment idea when I realized my favicon was multiple kilobytes large. To fix this, I used a favicon generator to generate optimized versions of the icon for multiple targets. Then, I had to override the layouts/partials/header_includes.html file from my theme so the HTML had the proper meta attributes to make use of these favicons.

Switched to using org-mode and ox-hugo

Previously I had made use of Hugo’s built in .org file support to write a couple of my posts. I haven’t used org mode much, but since my primary way of editing text is Emacs (specifically Doom Emacs), using the format is an attractive idea. Org mode has some neat features, some of which I was not previously aware of:

  • Export to multiple formats (html, markdown, etc.)
  • Hierarchical organization
  • Folding/Unfolding elements
  • Time tracking
  • TODO lists
  • So much more it’s not even funny

I don’t really know how it compares to markdown other than saying that the two are incomparable. Markdown is a simple format for converting to HTML, while Org mode is a full blown Personal Information Management system encoded in plain text files. All I know is that I’m liable to never leave emacs if I can figure out how to grok it.

Instead of using hugo to parse the org files I write, I’m now trying ox-hugo, a plugin for generating hugo markdown files from org files. So far I like it. It’s nice to have multiple blog posts in a single file. I’m undecided on the markup, but the tree based nature of it is compelling.

NOTE: After starting this post I’ve sunk a couple days into configuring and using Org mode and I’m addicted. I now have email set up to work with org mode and I am trying to use it for organizing my school and work life. I can see why emacs-everywhere exists now. I’m also trying to install that.

Installed A New Theme

I’ve switched the theme to hugo-PaperMod. There were a couple reasons (some broken components, quibbles with the design), but it’s mostly because ox-hugo’s getting started instructions used it. Low-effort decision making goes brrr…

Figure 1: It wasn’t terrible, but I’m less enamored with all the Serif fonts it used now…

Figure 1: It wasn’t terrible, but I’m less enamored with all the Serif fonts it used now…

I also got some features that I didn’t have previously:

  • More favicon support (I can get rid of my little shim from earlier)
  • Light mode/dark mode toggle (I’m sure someone out there uses light mode)
  • Search

I’m considering forking the theme so I can add templates for non-post content like games. I may not even need to go that far, if I understand some of Hugo’s features correctly, but this does seem like a good use case for vendoring. If you’re experienced with Hugo, I’d love to hear some advice on the subject!

It took a bit of work to figure out how to properly enable search, but I did get PaperMod’s built-in search functionality working. The search is powerd by fusejs, and PaperMod did all the integration/build work. Currently this is of limited usefulness, but I’ll fill the site up with content soon enough. I hope.

Initially I had all of my navigation in the header, but that quickly grew to be unmanageable. The full navigation is now in the footer, with the most important options duplicated in the header.

To accomplish this I modified the footer by creating layouts/partials/extend_footer.html and adding a menu.footer parameter to my configuration. This is the code I used for the footer:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<footer class="footer">
    <!-- Copied from PaperMod layouts/partials/footer.html to show support for the project -->
    {{- if .Site.Copyright }}
    <span>{{ .Site.Copyright | markdownify }}</span>
    {{- else }}
    <span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span>
    {{- end }}
    <span>
        Powered by
        <a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
        <a href="https://git.io/hugopapermod" rel="noopener" target="_blank">PaperMod</a>
    </span>
    <!-- Some basic styling I didn't think was worth putting in a separate CSS file -->
    <style>
    nav.footer-nav {
        margin-left: 4px;
        padding-left: 8px;
        border-left: solid 2px;
    }
    nav.footer-nav, nav.footer-nav * {
        display: inline;
    }
    nav.footer-nav ul {
        list-style-type: none;
    }
    nav.footer-nav ul li {
        padding-right: 4px;
        display: inline;
    }
    </style>
    <!--
        Code adapted from Papermod layouts/partials/header.html to use .Site.Menus.footer.
        Active page is not highlighted.
      -->
    <nav class="footer-nav">
        {{- $currentPage := . }}
        <ul>
            {{- range .Site.Menus.footer }}
            {{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
            {{- $page_url:= $currentPage.Permalink | absLangURL }}
            <li style="display: inline;">
                <a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }}">
                    {{- .Pre }}
                    {{- .Name -}}
                    {{ .Post -}}
                </a>
            </li>
            {{- end }}
        </ul>
    </nav>
</footer>

Future Ideas

I think my site is already a lot nicer to use now, but I’m not done yet. I’ve got a couple things I want to implement but don’t have the time to work on right now.

  1. Share tags - I’d like to add a way to easily share my content on sites like reddit, twitter, and the fediverse. Preferably I’d be able to provide this without loading scripts or assets.
  2. Comments - Because I’m using Hugo and statically generating my site, it takes bit more work to get comments set up. I’ve found a couple ways to get them working such as disqus, utterances schnack, and commento. I don’t want to use disqus or utterances because they are potential vectors for tracking users through the internet; commento might have the same problem, though they claim they don’t. Schnack looks interesting because it is self-hosted, but I haven’t taken the time to fully investigate and try it out. It’s also based on nodejs + npm which I’m not super enthusiastic about…

When I do get these implemented I’ll make another post.