2021-12-01 12:24:42 +00:00
|
|
|
# blog-hugo
|
2022-05-30 18:38:51 +01:00
|
|
|
|
|
|
|
|
This is probably the hundredth rendition of this site xD Previously to
|
|
|
|
|
using HUGO my blog was built using GHOST CMS which is a great platform
|
|
|
|
|
and is feature rich. However my problem came with the base design
|
|
|
|
|
philosophy of a CMS, relying on a Database.
|
|
|
|
|
|
|
|
|
|
HUGO is a static site generator meaning it takes a readable file format
|
|
|
|
|
like markdown and then compiles all that down into HTML (Static Files)
|
|
|
|
|
This removes the need for a database and in turn improves performance of
|
|
|
|
|
the site ten fold.
|
2021-12-01 13:03:25 +00:00
|
|
|
|
|
|
|
|
## Pros of static sites
|
2022-05-30 18:38:51 +01:00
|
|
|
|
2021-12-01 13:03:25 +00:00
|
|
|
* Security
|
|
|
|
|
* Reliability
|
|
|
|
|
* Speed
|
|
|
|
|
* Scalability
|
|
|
|
|
* Low Resource requirement
|
|
|
|
|
|
2022-05-30 18:38:51 +01:00
|
|
|
## Cons of a static site
|
|
|
|
|
|
|
|
|
|
* Less user friendly
|
|
|
|
|
|
2021-12-01 13:03:25 +00:00
|
|
|
## Why
|
|
|
|
|
|
2022-05-30 18:38:51 +01:00
|
|
|
The reasons above all fit within my goal of trying to containerise
|
|
|
|
|
services running in my home lab.
|
|
|
|
|
|
|
|
|
|
The plan is to move the services I use to a cluster of Raspberry Pis. As
|
|
|
|
|
long as the services have an ARM image or I can build an ARM image then
|
|
|
|
|
this is a viable solution
|
2021-12-01 13:03:25 +00:00
|
|
|
|
|
|
|
|
## How
|
2021-12-01 21:46:41 +00:00
|
|
|
|
2022-05-30 18:38:51 +01:00
|
|
|
The deployment method of this site relies on the Gitlab CI/CD pipeline.
|
|
|
|
|
* Clone the repository
|
|
|
|
|
* Push changes to Gitlab
|
|
|
|
|
* Gitlab runners create the docker image
|
|
|
|
|
* Image is pushed to my private docker repository
|
|
|
|
|
* Pi cluster uses that image to host the site locally
|
2021-12-01 21:46:41 +00:00
|
|
|
|
|
|
|
|
## When Pulling / Cloning
|
2022-05-30 18:38:51 +01:00
|
|
|
|
|
|
|
|
Be sure to add `--recurse-submodules` as the theme used is a submodule
|
|
|
|
|
|
2021-12-01 21:46:41 +00:00
|
|
|
``` bash
|
2022-02-23 18:16:11 +00:00
|
|
|
git clone --recurse-submodules git@gitlab.com:AHMZA/blog.git
|
2021-12-01 21:46:41 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Update the theme
|
2022-05-30 18:38:51 +01:00
|
|
|
|
|
|
|
|
As the theme is a submodule it will need to be update with the following
|
|
|
|
|
|
2021-12-01 21:46:41 +00:00
|
|
|
``` bash
|
|
|
|
|
git submodule update --remote --merge
|
|
|
|
|
```
|