A toy project I like to fiddle with is a person URL shortener. Right now I have an old URL shortener on zikes.me to which I added some logic to the routing, such that certain paths would lead to administrative areas while others would be treated as shortened URL keys. This was pretty hack-ish, and I’d like to be able to use
/anything as a key without worry. That meant either a separate administrative process, an API, or somehow serving a separate admin area via a subdomain, like admin.zikes.me. The third option sounded ideal, as keeping the admin within the same process should keep the code pretty tight.
In an attempt to continue doing things right, I’ve put my blog in a git repository. I considered putting it on Github, whether public or private, but honestly I’ve been looking for an excuse to set up my own personal Git server. Normally I’d go with a self-hosted all-in-one system like Gitlab or gogs. We use Gitlab at work, and I love the minimal resource usage of gogs, but for now they’re just overkill for what I need.
In an effort to make blogging more painless, I’ve set up some conveniences.
First, per a recommendation from Hugo’s documentation, I made a
deploy.sh script to make the build & upload process nice and simple.
Everyone loves parsing XML files, right? The inconsistent formatting, undocumented fields and attributes, they’re always a hoot. If you’re especially unlucky, you’ll also come up against invalid Unicode characters that cause the parser to choke, as I did recently:
2017/01/24 11:28:06 error parsing data/201701182200040_58647400_2.xml: XML syntax error on line 96: illegal character code U+001E
One of my initial concerns with using a static site generator was managing related content files. Some posts may have related post-specific images, or scripts, and I didn’t want to have to manually organize them in
/static subfolders. Ideally, they would live alongside the post’s own