New Blog Setup

Share on:

Some slight changes

I have described my blog setup in a previous post and while I’m not an avid blogger (yet?), this setup became a bit too complicated for my liking.

I’ll follow the same structure as my previous post to explain …

Website creation

The website is still created with Hugo but I switched themes, from Ghostwriter to Clarity.

I also run hugo locally on my FrankenBook (a beefed up Late 2009 MacBook) for faster rendering, checking content locally, preparing future posts, trying new things like new themes and easier to upgrade.

On macOS, I just use Homebrew to install and update hugo as well as other tools from the Linux world.

Hosting

Webfaction was still fine but I decided to switch to something more local to me (Sydney instead of Singapore).

I’m now running this blog from VentraIP. So far it’s been as reliable as Webfaction.

There are also a few added benefits :

  • traditional cPanel management
  • can act as a domain registrar

DNS & Security

No change

Markdown

As I wrote in my previous post, I didn’t wanted to be tied to a specific device for content creation. That proved to be a mistake for me because being on a device that I associated with blogging was like a reminder that I should blog. I hinted that Visual Studio Code was quite a nice editor for Markdown and that’s what I use now.

With a VS Code workspace I can have all my posts listed for easy reference and correction if required and version controlled via git.

Workflow

I have the same Cloudflare rules to force HTTPS, support HTTP/2 but now pointing to VentraIP

I write a new post on my MacBook using hugo new content/post/new-blog-post.md that is saved on the local SSD.

A macOS folder action replicates the folder content to the second HDD for local archive.

All those are also included in the built-in backup tool in macOS Time Machine on a network drive.

Once done, I have setup an Automator application that generates and upload the site. First action is a shell script action that runs

1cd /Users/hdex/Documents/websites/hdex
2
3/usr/local/bin/hugo

Second action is to FTP the static files generated to VentraIP (via ncftp available on Homebrew) running

1/usr/local/bin/ncftpput -u username -p '[email protected]' -R ftp.server.com public_html/ /Users/hdex/Documents/websites/hdex/public/*

Finally, I added a notification. Not that useful as it all gets done in about 10s (most of it being for FTP) but always nice to know what’s happening.

Conclusion

The same simplicity as my previous setup but some refinements :

  • still no database to setup
  • the same portable content using markdown (tested and validated by moving all those posts)
  • Easy to edit via VS Code with Markdown support and Live Preview (⌘K V)
  • Multiple Backups (local and Network)