Back to Static Websites!
Thanks to some prompting by Bryan Lunduke, I’ve decided to move this old website to Hugo. This site is now a static site generated by software on my local workstations.
I find this pretty cool as this is how I started experimenting with websites back in ‘92 thanks to a BSD account and home page at Cyberstation in Wichita Falls, a pioneering ISP at the time which I believe is no longer in business.
Transferring the content from Wordpress to here wasn’t quick but it was relatively easy. It took less than an hour (it too longer to find a theme to modify and modify it to my initial satisfaction). The longest time spent on the data migration was globally searching/replacing image links and src references, but it took me about an hour to modify the Hugo Swift Theme.
I used a Wordpress plugin named wordpress-to-hugo-exporter which gave me a pretty big .zip file with a basic directory structure which I could place in my new site and start modifying paths, etc to work with Hugo. The most tedious part was to go through each post and assign a preview/post image. At the time of this writing, I’ve only modified a few, more recent posts.
From there, I created a makefile to easily help me run the commands to develop and deploy. I use ssh keys to push to my server. Here’s an example of my Makefile with the names changed to protect the inno….erm keep my privacy safe.
publish: # Compile the site and create the public folder @hugo # Rsync the site to the server @rsync -amr --stats -e ssh ./public/* email@example.com:/srv/www/mydomain.com/_/public_html deploy: # Compile the site and create the public folder @hugo # Rsync the site to the server @rsync -amr --stats -e ssh ./public/* firstname.lastname@example.org:/srv/www/mydomain.com/_/public_html server: hugo server -D serve: hugo server -D dev: hugo server -D
..from there I can just run a simple
make publish to publish my website, or if I’m wanting to create a new post just run
make server (or
make dev, etc as I’ve got a few duplicates to keep my memory frustration level down).
That’s it for this quick post. Since I’m editing in markdown, I’m pretty happy that I can edit with an offline-text editor and not worry about the huss-and-fuss of the Wordpress sign-ins, security, and other headaches which I’ve had over the years.