Project: This website.
Reasons
My previous website was a WordPress site.
I have to recognize that WordPress provides wonderful sites and an easy way to start a publication activity.
But, it uses a database, and when you want to switch to another server or a personal server, it’s a lot of work and configuration. This is not the most efficient way to share data (even if there is caching, you need processor work and much electrical power to do this). Also, you have to run the updates (WordPress itself, plugins, database, server…).
In the end, it’s a significant amount of work to organize your data, save, retrieve, and debug…
So, I looked to a more efficient solution, running on an elementary server, where I don’t have to fight with a database and where the backup and retrieve can be done without problems.
The solution was easy to find: move to a static website.
It provides several advantages:
- I don’t need to have an online edition. I can update my site, thanks to a simple text editor.
- It could host on GitHub, GitLab… freely. The host does the backup, and Git provides version control.
- I don’t have to fight anymore with a database, and I can read or retrieve my post in a text file, even if the webpage is not displayed.
- It saves (a little) electrical power.
About the tools
There is much software to generate a static website. The most common are Hugo, Jekyll (available with Github)…
I select Hugo. It can build more complex things, support multi-languages websites, and provide several customizations.
Hugo installation is easy. On Windows, just download, unzip where you want, and run the single exe file (thanks Go for such simplicity).
To create your website, you follow the Getting Started page.
I try several themes, but my final choice is Cupper. It is simple, readable, and provides a night mode.
Update Github host
Thanks Github actions, it is possible to generate and update the content in Github automatically.
To do this, I follow the explanations provided in Ruddra.com.