An email has come flooding in to request information about the website software I use. So then, technical minded readers and enthusiastic neophytes alike, let us take a journey into the web.
This is the second post in a series about how I do my writing. The first post introduced you to my writing software, Emacs. I mentioned that one of its benefits was that I was able to write everything in one place and then have it ‘publish’ to lots of different places with very little effort.
This website is one of those places. As you can imagine, it was important to my writing setup that I chose a website system that fit into this write-once-publish-everywhere philosophy. The software I use is called Hugo.
I should note that Hugo is by no means the only website software that would have worked with my writing setup. In fact, there are probably a very great number of systems that might have done just as well. However, I chose Hugo for some particular reasons which I will detail here. Additionally, I just happened to like the way that Hugo was designed and this is purely subjective on my part.
Before I tell you why I chose Hugo, let us take a look at how websites are made today. Simplifying things greatly, let us say that there are three ways to make a website:
- Manual Static Creation
- Dynamic Generation
- Static Generation
Manual Static Creation
The simplest way to make a website (and the original way) is to create the website once in full, then upload it to a server somewhere. Each time a visitor comes to your website they will see the exact same thing, unless you go through the time-consuming process of updating the entire site and uploading it again.
The benefits of this system are that it is quite easy to make, doesn’t require databases or other fancy server features (which tend to cost more money), it’s usually quite secure, and it will load quickly for your visitors.
The downsides are that the websites are time-consuming to update and not very dynamic.
These websites are more complicated to create and usually require some sort of database and language processor on the server (which often costs more money). However, these websites have the ability to update themselves based on content from other sources (such as other websites or the site’s visitors).
The benefits to this system are that it produces sites that are easier to update (you can add single items of content through the website itself without needing to update the whole site and upload it manually), it is more dynamic and allows content to be pulled in from its visitors and other sources, menus and links automatically update to display new content, and content can be customised for each visitor.
The downsides are that these websites are less secure (requiring you to frequently spend time updating the website software), if you use third party sources or visitor content then you must monitor what content appears on your site, they are generally quite complicated to set up, and they usually cost more to run due to the databases and other server features that they rely on. These sites also tend to load more slowly because they need to generate their content on the fly. Depending on how good your server is, this could make the site a lot less fun for your readers to use.
Between static creation and dynamic generation we have a middle ground. Statically generated websites are generated in one go before they are uploaded to a server. The idea here is to make the websites easier to update, but not require the databases and scripting languages of dynamic websites. Once the website is uploaded, it will appear the same for each visitor with no auto-generated or user generated content.
The benefits then are ease of updating, menu systems and other links being automatically created, no requirement for databases or fancy server features, generally very secure, and very fast to load.
The downsides are that the sites are less dynamic than fully dynamic generated sites, and it isn’t tailored to each visitor.
Hugo is in this last category. The reason I wanted a static generator solution is that this website only needs to be updated sporadically and I didn’t feel visitor personalisation or public comments would be useful in this case. I also wanted the ease of updating through my writing system and most static website generators deal better with this than the other two methods.
There are many static site generators around, and the reason I went for Hugo is that it seemed to work the way I would expect such a system to work. As such, the learning process was pretty easy for me. When I investigated other systems, they seemed much more complicated. Hugo is also very fast and just requires one program file to work.
For Hugo, all the files that tell the site how to look and what content to display are on my computer. I just run the Hugo program and it converts all those files into the website. After the site was initially set up, all you have to do is add content files and Hugo takes care of the rest.
I won’t go into any more detail about Hugo here as it is a complex topic but hopefully I have given you enough information to investigate it yourself if you’re interested.
Later articles may contain a more in depth tutorial of how Hugo works together with the rest of my writing setup.
Catch you next time.