Categories
Life Weblogging

Help with Hugo

A wonderful boquet of flowers.A couple weeks back my WordPress weblog started doing funny things. Apparently someone was able to gain access to it via my Jetpack login and install a bitcoin mining service. Joy.

When you’d visit my site you’d occasionally get booted to another site, typically one that wasn’t nice, but on occasion it was what appeared to be a nice weblog. I’m not sure who’s it was but it wasn’t wanted.

So I disabled the site and put up a temporary placeholder page while I figured out what to do about it. This is the second time I’ve had to make changes because my WordPress site was broken into. It makes having a blog a lot less fun when idiots break you stuff.

I decided I’d install Hugo and figure out how to use it to automagically post on my server. I found a nice page documenting how to use git with git triggers to publish a Hugo based weblog and went about trying it out. It works fine, but there is something I can’t figure out.

When publishing I would like to have my front page contain some number of blog posts with permalinks to those posts. E.G. Clicking on the title would take you to a URL like

https://iam.fahrni.me/2018/01/08/2017-iphone-homescreen/

. Notice the yyyy/mm/dd format in the URL. I want that exact thing for my Hugo pages so I can import what I already have and not mess up links to my existing posts. Hugo looks like it can do this, but there’s one thing that bugs me and I haven’t been able to figure it out.

When you click on the permalink it displays a URL like the one above but the file doesn’t actually exist at that location. It must use some JavaScript to do the work, I guess? I have no clue because I don’t grok how web pages and JavaScript really operate.

Can someone please let me know if Hugo can generate a standalone HTML file and drop it into a directory with yyyy/mm/dd format so I can maintain what I already have? If I can do that I’m all in with Hugo. Otherwise it’s off to find a fully baked blogging system that can do what I want.

By Rob Fahrni

Husband / Father / Developer