A fast orang utang cycling with the peloton

Blogging with VS Code and Hugo

Reading Time: 2 minutes

Yesterday I had no inspiration. In the end I did write about something but only after hours of staring at a hypothetical blank page. When I did start writing I used Frontmatter to generate the page but I forgot to open terminal and write the blog post using VIM. I used VSCode and Markdown. Whilst this might sound ordinary to most I did this because I like writing blog posts with VIM as it gets me to learn, over time, how to use it, automatically, rather than by struggling.

Very Fast

I really like blogging with hugo, VIM and VS Code because it’s quick and efficient. With Frontmatter I can create the front matter I need for the Markdown document, and then I can start writing, until inspiration dries up, or I have nothing left to say.

Git, Git FTP and VIM

I then add the blog post to git, type hugo, generate the new page, and then git add all the publish files before going to a second directory and writing git FTP publish. If I wanted to be more of a purist I could do everything from within one or two terminal windows. One terminal window is to keep a live preview of the page, and the second is for git, git ftp and VIM.

The hugo Command and FTP

Although my site is large it is still faster to run hugo, to update and then ftp the site. Although FTP is seen as old fashioned it works well. I did add a safety feature. I created an FTP account just for the blog and I specified the directory. This means that if people do get access to that FTP account they can only change what is within the blog directory, nothing else. I’m applying the “minimum privileges to get things done” principle to keep the site secure.

Slow WordPress

When you go from VSCode, vim and git to keep a site up to date to WordPress WordPress feels slow and clunky. WordPress requires you to be online, to navigate to the right page, and the create content, before eventually saving, and checking that it works. The 26 seconds that it takes to generate the latest page and associated pages still feels faster than WordPress.

And Finally

The beauty of using Hugo rather than WordPress is that it’s fast. It’s almost instant to navigate to all pages. The let down is that you do need to spend some time reading the fantastic manuals to learn how to do specific things. With WordPress it’s built in and simplified.

Similar Posts

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.