from git submodule to hugo module

Hugo module for the theme blowfish is a lot lighter compared to the git
repo
This commit is contained in:
ahmza
2024-07-16 19:51:01 +01:00
parent 0f34d5e9e8
commit cdfaf04e6d
6 changed files with 18 additions and 7 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ variables:
# Major - Shouldn't change often, Big changes to the site # Major - Shouldn't change often, Big changes to the site
# Minor - starts from 0 when Major is incremented +1 for each version that goes public # Minor - starts from 0 when Major is incremented +1 for each version that goes public
# Release - For each time a development milestone is reached # Release - For each time a development milestone is reached
VERSION: 1.2.83 VERSION: 1.3
BUILD: 1 # If set to 0 gitlab will not build the image BUILD: 1 # If set to 0 gitlab will not build the image
IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION IMAGE_TAG: $CI_REGISTRY_IMAGE:$VERSION
+8 -4
View File
@@ -1,15 +1,19 @@
# use the classic alpine image # use the classic alpine image
FROM alpine as Builder #FROM alpine as Builder
FROM golang:1.22.5-alpine as Builder
ARG GITLAB_TOKEN ARG GITLAB_TOKEN
# install curl and git # install curl and git
RUN apk add --update curl git # RUN apk add --update curl git
RUN apk add git
# download and unnzip the hugo binary then place it in /usr/local/bin # download and unnzip the hugo binary then place it in /usr/local/bin
RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_0.121.1_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin #RUN curl -L https://github.com/gohugoio/hugo/releases/download/v0.121.1/hugo_0.121.1_linux-arm64.tar.gz > hugo.tar.gz && tar -zxf hugo.tar.gz && mv hugo /usr/local/bin
RUN CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.128.2
# clone the blog repository as well as the theme submodule # clone the blog repository as well as the theme submodule
RUN git clone --recurse-submodules https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git # RUN git clone --recurse-submodules https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git
RUN git clone https://oauth2:$GITLAB_TOKEN@gitlab.com/AHMZA/blog.git
# set blog (the folder we just cloned) as the current DIR # set blog (the folder we just cloned) as the current DIR
WORKDIR blog WORKDIR blog
+1 -1
View File
@@ -2,7 +2,7 @@
# Refer to the theme docs for more details about each of these parameters. # Refer to the theme docs for more details about each of these parameters.
# https://blowfish.page/docs/getting-started/ # https://blowfish.page/docs/getting-started/
theme = "blowfish" # UNCOMMENT THIS LINE #theme = "blowfish" # UNCOMMENT THIS LINE
baseURL = "https://blog.ahmza.com/" baseURL = "https://blog.ahmza.com/"
defaultContentLanguage = "en" defaultContentLanguage = "en"
+3
View File
@@ -1,3 +1,6 @@
[hugoVersion] [hugoVersion]
extended = true extended = true
min = "0.87.0" min = "0.87.0"
[[imports]]
path = "github.com/nunocoracao/blowfish/v2"
+5
View File
@@ -0,0 +1,5 @@
module gitlab.com/ahmza/blog
go 1.22.5
require github.com/nunocoracao/blowfish/v2 v2.73.0 // indirect
Submodule themes/blowfish deleted from 1f08dcb9d2