I have been trying to create my own blog for the past few years now, but rarely managed to find time to sit quietly for an hour and write an article. When I did, I would end up being distracted by something else. As I have had numerous experience with wordpress sites my normal approach would be to buy a cheap server and after a few minutes that the server is up I would have a wordpress instance running with all the plugins needed for security, caching and SEO.
This time round I decided to go towards something different, I wanted to create a static website. During my my first job, wordpress was still starting and the company utilised a CMS Software which had a good local editor and when you needed to publish your content the CMS would generate the HTML and uploaded it automatically on the server. I found this to be less distracting then using a WYSIWYG in a browser and easier to test locally. To my surprise when I started searching for a modern static generator I found that it is trending again and that there where numerous platforms available. After some experimentation I decided to go with gohugo. Gohugo, has a flexible structure and has a number of good themes. Another advantage of gohugo is that you can test locally without the need to install any other software such LAMP. Simply use
hugo server
in the termianl and you have an instance of the site running. The content is rebuilt once you save your changes. To top it of, it is also written in golang making it very fast to build the site.
If want to update the content of the website instantly from anywhere by just logging in the administrator panel, this approach is not suitable for you. With this approach, you have a few extra steps. First you need access to a copy of the folder that holds the latest website structure. Once you can access the folder folder and you update the content you need to upload the built content. I see these extra steps as a positive, by utilising git to version my content. I have two branches, the ‘master’ being my production website and ‘staging’ branch containing the articles I’m working on. So all the articles are written in the staging branch, once I am ready to publish all I need to do is merge to the master branch. With the help of gitlab CI, this will automatically run a pipeline which will publish the content to my site automatically.