Skip to main content

Pretty Good Hat

My First Hugo

This is my first post to Hugo. So far, so good?


Running log of my work to get Hugo set up the way I want it:

  • Jan 15: Installed on Pair and on my MacBook locally. Made the first version of this post. (Required installing Go on the MacBook, as well as figuring out the environment variables to run Hugo.)
  • Jan 16: Wrote a quick ruby script based on a snippet from my homegrown static blog site, to migrate all my markdown entries to Hugo; this required reading their dates and titles and adding them as proper toml metadata to the Hugo file headers. It sure was a good decision to use a bunch of plain text files when I built my own engine.
  • Jan 17: Themes are kind of complex. I’m playing with the HPSTR theme. Figuring out how to work with it involves learning a little bit of how SASS works, and a whole lot of trial and error. This theme has a lot of components. I’m tinkering with color and some of the page’s components: To wit, today in a couple of hours I learned how to change the header and link colors and remove the ‘reading time estimate’ from the list page.
  • Jan 18: What now? I’d like to remove the hamburger menu. Also need to figure out a urg-ahoy-hoy Deployment Method. Though I’m also re-watching The Expanse while I sit in a bar, so this may go more slowly.
  • The great majority of all my content converted to the Hugo site works just fine as-is. There are two notable exceptions:
    • First, the link list-type posts that I wrote for my homegrown blog worked by having a link in the title/header. As-is, Hugo doesn’t render these. This might be fixable easily by adding | markdownify to the template where the title is rendered, as in the list and single templates for the theme.
    • Second, the images that I display using the lightview lightbox don’t display, because I don’t have the required style and script available.
    • (Jan 21) This took a while to get a handle on, mostly because I’m not very good at this, I wasn’t focused, and I might have had a drink or two. Figuring out Lightview involved learning how to deal with Hugo shortcodes and then doing a bunch of debugging. I ended up with a shortcode, basically a snippet that inserts the arguments I specify, into the code that I used to build for lightview. Additionally, I had to put the calls to lightview’s javascript and stylesheets, as well as to jquery, in my page templates. Of course, now I have to go and re-code in my markdown files, but I do have a good method going forward (and I don’t have all that many posts with the old lightview method, anyway).
    • (Jan 22) Done. This shortcode thing works great and I’m looking forward to experimenting with it for more uses.
  • Jan 22: Now I need to figure out an index/archive page.
  • Jan 24: It’s a snow day. I’m screwing around at home while the kiddo builds stuff in Minecraft. So I learned a little more about templates, worked on a replacement for the nav hamburger menu, and applied a little bit of my crappy design sensibility to the header.
    • Next on the improvements list: Cleaning up markdown links in my archive page, and maybe better link presentation on their individual pages.
  • Jan 26: Oh, right, need to do RSS and figure out if there’s a webmentions method to add.
  • Cool, RSS is built in.
  • I think I’ll wait til I go live to work out webmentions. Can probably reuse a lot of what I already built.
  • Internal links are probably broken and need to be either fixed in the markdown source or redirected. Here’s the perl I came up with to replace relative and absolute links that used my previous convention.
 
    perl -i -pe 's/]\(\/2012(\S*)\.html/]\(\/post\/2012$1/g' *.md
    perl -i -pe 's/]\(http:\/\/prettygoodhat.com\/2017(\S*)\.html/]\(\/post\/2017$1/g' *.md 
    perl -i -pe 's/pics\//\/pics\//g' *.md
  • Probably should install some syntax highlighting. Then I think it’s about time to go live.
  • That was easy. Added pygmentsuseclasses = true to my config, and:
<section id="main">
  <div>
    <h1 id="title">{{ .Title }}</h1>
    {{ range .Data.Pages }}
      {{ .Render "summary"}}
    {{ end }}
  </div>
</section>

To make this work on my web server I needed to $ pip install --user pygments.

  • Prep for deployment by marking all posts as draft = false: perl -i -pe 's/draft \= true/draft \= false/g' *.md

AirPods are Cool

Maybe I’ll do a little more writing here on the blog or elsewhere this year. I’ve meant to note lately that I’m really very much liking my AirPods.

Among the write-ups I’ve read around the internets, Steven Aquino’s review resonates strongly with my own thoughts, especially the idea that they’re just fun to use. There’s some real magic in the way they pair and in how nicely they tell my iPhone or Mac to pause when I remove one. For me, using them with Siri is a little hit or miss: I’ve found the right amount of pressure to double-tap with to activate it but not smash the thing into my ear, and can usually speak quietly to change the volume, pause, skip tracks or start a phone call.

When there is some background noise, however, Siri doesn’t always catch the command; likewise if I just mis-speak or if Siri just isn’t feeling cooperative, then the whole thing can hang up and leave me digging in my pocket for the phone. Right now, where it’s winter in the high country, this may mean stuffing a glove under my arm, wrapping the dog leash around my waist, and grumpily poking at my iPhone curmudgeonly. (A note about wearing these in winter: Right now I’m tucking them under a warm hat much of the time, so the fit is nice and snug. But in very cold weather, the metal antennae of the AirPods are quite efficient cold conductors. Chilly ears.)

The ease of use of the AirPods + case means that I basically am taking them everywhere with me. I never did that with wired ear buds. As a result, I find that I’m listening to more music and lots more podcasts than compared with a few weeks ago: A quick walk with the dog means five or ten minutes with a show or some tunes, and I’m really enjoying that.

Weaknesses

In my use so far, the only place where the AirPods don’t feel like a rock star must-have is for voice calls. This is a big part of my use case, as I work from home quite a bit and spent a lot of time on the phone. AirPods do give me a lot of flexibility to walk around while on a call and make it quick and easy to get on the phone (no more untangling ear bud wires after fishing the things out of my bag). But: 1) Voice call battery time is not good: Compared to five hours of listen time, I get, max, two hours of phone time, even when I’m mostly on mute and only occasionally using the mic on my end. This leads to the awkward dance of putting in one AidPod while the other charges, then checking the charge every once in a while, and swapping ears to re-charge the active *Pod. Not optimal, but I get that it’s not the primary use case for most. And, 2) Not regularly, but frequently enough to be a distinct problem, the phone will stop sending the call to the AirPods and revert to phone audio. Resolving this is a matter of re-selecting AirPods as the audio destination, but it’s annoying and sort of worrying that this happens at all, much less once or maybe twice a day if I’m on the phone a lot or on a particularly long call.

So, overall I’m pleased as can be, really liking these tiny magic things and the way they fit into my daily life now. It’s fun to have a cool and somewhat delightful Apple experience these days.

January: a month of tiny challenges

Inspired by Jamiee Newberry, I participated in a month of tiny challenges. The goal I set myself for January was to find and record a “today I learned” item each day for the month. Each of those daily notes is attached as a webmention to this post; another handy use for that comment-like webmentions tool is that it can approximate something akin to tags just by linking. So that’s cool.

I have one final TIL to complete for the month. I’ve enjoyed it and the small and encouraging community that formed around the tiny challenge idea, and while I can’t say that every day was something particularly insightful, I do appreciate looking back on the month to see the way a small amount of effort each day adds up to something real.

So with that in mind I’m going to try another one for February. I’ve been listening with a lot of interest to the tiny challenges podcast; Jaimee and Daniel Steinberg have talked about “three words” that will help act as compass points for them during the year; ways to give themes to their actions and measures against which to set their success. I want to take some time in February to define three words of my own. The tiny part of the challenge will be to make a note to myself each day about my thinking or decisions related to my three words: this could be a single sentence or it could be more, but I’ll complete it each evening. I may or may not make this writing/thinking public, because much of it is really for my own brain, not for feedback of vetting. I’ll share some as I go, to be sure, but want to remove the obligation on myself to do something for an audience each day, as this was one of the things I wrestled with a bit this month.

By the end of the month I will have a fleshed out set of thoughts for each of three words that will help me shape my approach to the rest of 2016. So, bring it on, February!

#tinychallenges

#TIL 30: Dog People

Today I learned that if you’re a dog person, the house just doesn’t quite feel right without a dog. And, should you happen upon a dog, you are basically powerless. We we went to the hardware store for furnace air filters and they just happened to be having an adoption event with Second Chance, a local shelter.

We we came home with furnace filters, of course, and also a little lady we are calling Gunnison. She is a border collie/Newfoundland mix. Oh my, what have we gotten ourselves into?

#tinychallenges

#TIL 29: Analysis

Learned a lot about some specifics of a work process that makes up a big part of a project I’m working on.

I don’t love having these obtuse TILs; it’s a consequence of my work not being so public, but that work nonetheless is a big part of what I do daily, so it’s natural that a lot of things I learn come from it. That makes it hard to reflect on them in this forum, sort of un-satisfying.

#tinychallenges

#TIL 27: My Job

Some discussions the last few days but particularly today clarified part of my evolving job role. I’m used to being a doer, but lately a good chunk of my commitments are around facilitating: helping others do things well, helping build a strategy in which other projects will fit, and connect a lot of organizational dots. Don’t get me wrong, there are still a lot of deliverableswith my name on them; I need to exercise some agency and planning to find the right balance, for me, between making things and supporting others in doing the same. That’s an interesting, exciting challenge.

#tinychallenges