Choosing a Hugo theme: Part 2

I did look at all 141 Hugo themes that were available when I began this search for a theme for this site. I’m not quite ready for the information dump of which themes I liked, which fit the requirements, mostly because I wrote my notes in pencil on a series of grocery-list-sized memo pad papers. And after it was all over, a new theme called Minos appeared, and I liked it enough to use it for the time being.

Read More

Combine Hugo build and rsync transfer in one command

I saw this commit in the Hugo Github site with the following title, “doc: Add a “Deployment with rsync” tutorial page.” I am using Hugo. And rsync. Why not combine them? The commit by Github user lebarde offers this example: hugo && rsync -avz --delete public/ www-data@ftp.topologix.fr:~/www/ I cooked up a Bash script that included my particular rsync line (which is complicated due to my shared-hosting setup), fiddled around a bit to find the right ssh key on my local machine so I could do a passwordless login (I did), and now I have a Bash script in my /usr/local/bin that builds and deploys this Hugo site in one shot.

Read More

Choosing a Hugo theme: Part 1

There are a whole lot of themes for the Go-powered Hugo static site generator, and I don’t think I’ve necessarily been using a theme that is best suited to what I want to do with Hugo. I want to have a lot of posts, which means I need pagination. I’d like to have Disqus baked in. And syntax highlighting for code examples. I’ve been going through all the themes and trying to figure out which have pagination (the ability to list the blog index across multiple pages, though I also want an archive that lists every post on a single page) and the other features I’m looking for.

Read More

Eloquent JavaScript: Two ways to declare a function

I’m reading through “Eloquent JavaScript,” and I found this interesting. There are two ways to declare a JavaScript function: #!/usr/bin/env node /* Eloquent JavaScript, Chapter 3, Page 42 Define a Function - power */ var power = function(base, exponent) { var result = 1; for (var count = 0; count With the function declared a different way: #!/usr/bin/env node /* Eloquent JavaScript, Chapter 3, Page 42 Define a Function - power (modified) */ function power(base, exponent) { var result = 1; for (var count = 0; count Here are the differences:

Read More