Why did I choose Hugo to create my blog?
By Christophe Cluizel
- 5 minutes read - 866 wordsThis article is intended for people who want to create a blog and struggle to find the right tool.
What do I need to create a blog?
During the first days of autumn, I decided to start this blog to share information, knowledge and my opinion on various subjects. So the first question which came to me was: how to create a blog?
The immediate answer was with the famous software Wordpress. Indeed, it is very easy nowadays to create a Wordpress account, pick a nice theme and start to write articles for free and without technical knowledge. However, the limitations of this quick and free configuration can be reached earlier than expected. Here are the drawbacks which bothered me:
you can’t totally personalise your blog address (URL)
your theme choice is limited
you can’t install any plugins
you can’t manually edit any source files to customise pages
it is hard to optimize to reduce the loading slowness
Of course, some of those limitations can be solved by upgrading your subscription by choosing a paid plan. As I was at the very beginning of this blog history, I preferred to start with a free solution and as a developer I wanted to be able to personalise the design of the web pages.
What about managing Wordpress myself?
If you have a technical background, you can host and install Wordpress on your own server (as it is an open-source software) and register a custom domain name at a registrar. This solution solves all the previous drawbacks but implies server costs, server management and Wordpress installation.
Have you heard about static website generators?
Wordpress is a dynamic website, that is to say it requires a database to store all the website contents (articles, comments, etc.) in addition to the design files. When somebody visits a web page, Wordpress loads the design and dynamically injects the page content in the design. It is very convenient to easily manage your blog contents, but it is heavy and slow. For a basic blog website and as the only author, I don’t need a big content flexibility. For this case, a solution is to use a static website generator.
A static website is made up of only files (no need for a database) where design and contents are mixed together. When somebody visits a web page, the design and content are loaded as the same time. It is quicker than dynamic websites. The other big advantage is that you don’t need any servers to host your blog, and you can use a static website hosting service like AWS S3, which is free (except if your blog contains several gigabytes of contents).
To create this static blog website, I have chosen Hugo. It is a popular open-source static website generator. Its core concept is templating. It means that when you create your blog, two parts are distinct:
the design models or templates from a public theme which contain the graphical aspects (elements position, color, etc.). Those templates use HTML, CSS, Javascript languages.
the contents (titles, articles, etc.) which are written in Markdown (or HTML). Markdown is normal text with special characters to format the text. For instance
*my text*
will render my text and**my text**
will render my text.
Once you are ready to publish your blog, Hugo merges the contents into the templates to get the final web pages. Then you can deposit those files on your hosting service.
If you have technical knowledge, you can customise a theme or create it from scratch. For this blog, I used the ananke theme with some customisations.
Technical aspects
Before creating the blog itself, I:
created an AWS account (AWS has a 12 months free tier).
registered the tinycloud.fr hostname at the OVH registrar. Change the DNS configuration to use an AWS Route53 hosted zone instead of the OVH ones.
create an AWS S3 bucket to store the static website files.
create an AWS Cloudfront distribution towards the S3 bucket.
create a new A entry in Route53 - blog.tinycloud.fr - with the Cloudfront distribution as alias target.
Here are the big steps to create this blog. I:
used the Hugo Extended package (extended to enable SCSS).
customised the ananke theme by modifying the layouts.
wrote this article.
generated the static website files
uploaded those files to my previously created S3 bucket.
Conclusion
To wrap it up.
If you want to create a blog without any technical skill, go to register to a Wordpress.com plan with in mind that you will have restricted possibilities. Also, have a look at other famous tools: Wix, Medium, etc.
If you have some technical background, you want more flexibility and benefit from the huge Wordpress themes, plugins and community, go to host Wordpress on your own server or check companies which offer Wordpress hosting plan like Bluehost or OVH.
And finally, if you have some technical background, want a lightweight and powerful framework to create a basic and fast blog, give a try to Hugo.
This article gives a glimpse of my thinkings for my blog but don’t hesitate to deepen your opinion as many resources are easy to reach on the web.
Good luck and happy blogging!