articolo migrazione-wp-hugo #212

Merged
paspo merged 10 commits from amreo/bglug.it:migrazione-wp-hugo into main 2024-09-10 06:17:48 +00:00
Showing only changes of commit bfb69151b8 - Show all commits

View File

@ -30,7 +30,7 @@ The source code for both websites is public and available [here](https://git.lib
## What is a static site generator?
Before talking about Hugo, its important to understand what a static site generator is.
Before talking about Hugo, it's important to understand what a static site generator is.
A [Static Site Generator (SSG)](https://en.wikipedia.org/wiki/Static_site_generator), is a software that takes text files (e.g. in markdown or rst format) as input and generates a website consisting of HTML, CSS, JS, images, and other files, but without any server-side executable logic (like PHP or a REST server).
![Diagram showing how a generic SSG works. It illustrates how the generator takes input template files such as head.html, footer.html, and sidebar.html, along with content files like contacts.md, home.md, and product.md, and produces an output file tree containing an index.html file and two directories, each with its own index.html file.
@ -42,7 +42,7 @@ A [Static Site Generator (SSG)](https://en.wikipedia.org/wiki/Static_site_genera
[Hugo](https://gohugo.io/) is one of the many free(as freedom) SSGs available on the market, and probably the most popular one. It was chosen for both of our websites because it is fast, flexible, and has a wide range of themes available. Specifically, we decided to use the [hugo-arcana](https://themes.gohugo.io/themes/hugo-arcana/) theme.
For us, this means that whenever we need to update the website, such as creating a new article, we simply modify the content files according to the instructions in our [wiki](https://git.libreschool.org/BgLUG/bglug.it/wiki) and publish the changes to the official site repository. From there, a series of automations managed by Giteas CI/CD pipeline runs Hugo and uploads the generated files to the web server. These automations also ensure that the content is properly formatted and that nothing breaks.
For us, this means that whenever we need to update the website, such as creating a new article, we simply modify the content files according to the instructions in our [wiki](https://git.libreschool.org/BgLUG/bglug.it/wiki) and publish the changes to the official site repository. From there, a series of automations managed by Gitea's CI/CD pipeline runs Hugo and uploads the generated files to the web server. These automations also ensure that the content is properly formatted and that nothing breaks.
One of the advantages of using SSGs is that they allow third parties to propose changes to the website, as long as those changes are approved by us.