From f49428dfeacf74b79949639c726a3b66b688439b Mon Sep 17 00:00:00 2001 From: Anna Wiggins Date: Wed, 3 Jul 2024 20:58:00 +0000 Subject: [PATCH] Use Hugo modules to import theme, also modernize everything. --- .gitmodules | 4 ---- Dockerfile | 2 +- Makefile | 2 +- go.mod | 5 +++++ go.sum | 6 ++++++ hugo.toml | 5 ++++- themes/hugo_theme_pickles | 1 - 7 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 go.mod create mode 100644 go.sum delete mode 160000 themes/hugo_theme_pickles diff --git a/.gitmodules b/.gitmodules index 1cf6fbb..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "themes/pickles"] - path = themes/hugo_theme_pickles - url = https://github.com/mismith0227/hugo_theme_pickles - branch = custom diff --git a/Dockerfile b/Dockerfile index e961be5..110601d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM klakegg/hugo as build +FROM hugomods/hugo:0.128.1 as build WORKDIR /src COPY . /src/ diff --git a/Makefile b/Makefile index c302e52..611e8fa 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ DOCKER_TAG := latest all: serve serve: - sudo docker run --rm -it -p 1313:1313 -v ${PWD}:/src/ klakegg/hugo serve -D -b http://${DEV_IP}:1313/ + hugo serve -D --bind 0.0.0.0 -b http://${DEV_IP}:1313/ build: sudo docker build --no-cache -t ${DOCKER_IMAGE}:${DOCKER_TAG} . diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2d677d4 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module git.annabunches.net/annabunches/annabunches.net + +go 1.22.4 + +require github.com/annabunches/hugo_theme_pickles v0.0.0-20240703205628-424152ab5a84 // indirect diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..139a306 --- /dev/null +++ b/go.sum @@ -0,0 +1,6 @@ +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703202759-91b869dc58b1 h1:5KlbYrmn7GHUnJhNUIRk4fmhNGX2EjyU5d7uXRfCLv4= +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703202759-91b869dc58b1/go.mod h1:ab4BDFp6Wuo+H2esD/4Mgq+APRfJ07WdEjxMjah4zSo= +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703205252-c60cd4401745 h1:q6V3oobg4DQGDo/xaQ7v0LqQlZAVGKfcs3Az2fEyJE0= +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703205252-c60cd4401745/go.mod h1:ab4BDFp6Wuo+H2esD/4Mgq+APRfJ07WdEjxMjah4zSo= +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703205628-424152ab5a84 h1:8LLjtRpPZNWuoV3+WvzvoqixCVlq4A84hNMWdgxpppY= +github.com/annabunches/hugo_theme_pickles v0.0.0-20240703205628-424152ab5a84/go.mod h1:ab4BDFp6Wuo+H2esD/4Mgq+APRfJ07WdEjxMjah4zSo= diff --git a/hugo.toml b/hugo.toml index 8cc310a..a561bce 100644 --- a/hugo.toml +++ b/hugo.toml @@ -1,6 +1,5 @@ baseurl = "https://annabunches.net/" languageCode = "en-us" -theme = "hugo_theme_pickles" Title = "Anna and the Bunches" copyright = "© Anna Wiggins, 2006-2024" @@ -67,3 +66,7 @@ googleAnalytics = "G-QFK0K7MGCJ" defaultMarkdownHandler = "goldmark" [markup.goldmark.renderer] unsafe = true + +[module] + [[module.imports]] + path = 'github.com/annabunches/hugo_theme_pickles' diff --git a/themes/hugo_theme_pickles b/themes/hugo_theme_pickles deleted file mode 160000 index cefcae5..0000000 --- a/themes/hugo_theme_pickles +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cefcae57251c2707a07bc5f9c579feeea77b1e6c