This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,6 +14,8 @@ I've had a blog since early 2022. Historically, I chose Ghost to make this site.
|
||||
- Simple, modern theme
|
||||
- Regular updates
|
||||
|
||||

|
||||
|
||||
But after using it for quite some time, a number of problems have arisen that can't really be corrected:
|
||||
- Limited customization
|
||||
- Complex theme modification if you want to be able to update it afterwards
|
||||
@@ -59,6 +61,7 @@ git lfs migrate \
|
||||
|
||||
### CI/CD
|
||||
|
||||
#### Hugo docker image
|
||||
hugo.Dockerfile:
|
||||
```dockerfile
|
||||
FROM golang:1.22-alpine AS build
|
||||
@@ -70,14 +73,47 @@ ENV GO111MODULE=on
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache gcc musl-dev g++ git
|
||||
RUN go install -tags extended github.com/gohugoio/hugo@v0.122.0
|
||||
```
|
||||
I then use the following commands to build the Hugo image:
|
||||
```
|
||||
docker build -t git.d3vyce.fr/d3vyce/hugo:latest -f hugo.Dockerfile .
|
||||
docker push git.d3vyce.fr/d3vyce/hugo:latest
|
||||
RUN go install -tags extended github.com/gohugoio/hugo@v0.123.3
|
||||
```
|
||||
|
||||
|
||||
|
||||
```yml
|
||||
name: Build Hugo Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "hugo.Dockerfile"
|
||||
|
||||
jobs:
|
||||
build docker:
|
||||
runs-on: linux_amd
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
- name: Login to Docker registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.d3vyce.fr
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
file: ./hugo.Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: git.d3vyce.fr/d3vyce/hugo:latest
|
||||
|
||||
```
|
||||
|
||||
#### Blog docker image
|
||||
Dockerfile:
|
||||
```dockerfile
|
||||
# Build Stage
|
||||
@@ -86,7 +122,8 @@ FROM git.d3vyce.fr/d3vyce/hugo:latest AS build
|
||||
WORKDIR /opt/blog
|
||||
COPY . /opt/blog/
|
||||
|
||||
RUN git submodule update --init --recursive
|
||||
RUN git submodule update --init --recursive && \
|
||||
git -C themes/blowfish/ checkout v2.58.0
|
||||
RUN hugo
|
||||
|
||||
# Publish Stage
|
||||
@@ -149,10 +186,10 @@ Après avoir terminé la migration, j'ai comparé les 2 solutions.
|
||||
|
||||
### Performance
|
||||
Lighthouse result for Ghost based blog:
|
||||

|
||||

|
||||
|
||||
Lighthouse result for Hugo based blog:
|
||||

|
||||

|
||||
|
||||
| Metric | Ghost (Dawn) | Hugo (Blowfish) |
|
||||
|--------------------------|--------------|-----------------|
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user