Howtos

Notes for myself regarding how to maintain this thing

Quick rundown

  • This blog is built with Hugo.
  • Using a slightly customized version of the Blackburn theme.
  • It can be hosted whereever, but is currently hosted on one of my linodes.

Make image thumbnails

First, you need imagemagick installed.

Here’s a real world example of downscaling and making thumbs for a batch of images:

cd static/img/gunshots
mkdir thumbs

# Bigass iphone image downscaling
mogrify -resize 50% *.jpg

# Create thumbnails
convert *.jpg -resize 20% -set filename:f '%t' thumbs/'%[filename:f]-tn.jpg'

Deploy

I wrote a small shell script at ./deploy.sh that basically runs these commands:

#!/bin/bash

# generate all the bullshit
hugo

# fuckin' macos trash
find . -name .DS_Store -exec rm -f {} \;

# fix my insane umask
find public -type f -exec chmod 644 {} \;
find public -type d -exec chmod 755 {} \;

# copy up all the bullshit
rsync -az --delete public/ sinope:domains/nick.kuzmik.org/

# clean up the generated crap after rsync finishes
rm -rf public/*