August 1, 2017
3 min. read
I’ve used Python as my main programming language for a few years. When my Word Press was hacked and defaced yet again, I finally decided to rebuild my website with a static generator and host on GitHub. I leaned towards Pelican, due to the Python base that I thought I could modify if I needed. And I hoped that I could get it to work easily.
I did get everything converted over to .rst format and rendering. I didn’t really like the template that I was able to get working, but the site was back up. I even created new content. Then I switched my main computers and had trouble getting Pelican to work again. For some things, Windows Python is a pain.
This leads to a two years that I just didn’t update my web site, because I didn’t get Pelican building again. And it looks like even longer, because what I was updating was my Trans-Am entries, that I’m posting on the date they happened in 2002.
Over vacation, I looked at Go and Rust. These are often talked about like they are competing languages, but they really have mostly different domains. I think I would be more productive with Go, but it would not help me grow as a programmer. I also was a little annoyed that there were many blessed data types, that do things you are not allowed to do with the language. Rust has much less of this, as most of the language is implemented IN the language. However, it has an undeniably more difficult learning curve.
When looking at static generators in both languages, I found immature ones in Rust and a mature and polished hugo. This is written in Go, but it really doesn’t matter as it is installed with a compiled binary. And it renders fast.
It took me a few days to get up to speed in Hugo and with Go Templates. Then I converted my .rst files to .md files and changed the front matter. With it not being as flexible in url pathing, I was happy to see alias, which are easy redirects for content. I can point my old category paths to current date paths with no loss of search engine results.
There are still a few warts, like the crazy ton of empty lines when you process a template. This is apparently going away with Go 1.6 that will be used for compiling the next version. Hopefully, having a working build system will get me to update this site more often.
I’ve said that before.
Part 1 of 3 in the Hugo series.