From 92186c3a58226b9bc9f27cd9256823b2dc575819 Mon Sep 17 00:00:00 2001 From: Pagwin Date: Mon, 11 Sep 2023 16:22:44 -0400 Subject: [PATCH] Beginning work on sticking website into container saved all the relevent docs into a window, can't continue work now because I need to rest before I go back to driving, need to setup a conditional so I can do a docker build without having the comments section enabled though maybe have the arg be the name nginx should hit up for the comments instead of 0 v 1 for on v off --- Dockerfile | 12 ++++++++++++ content/blog/blog_v2.md | 12 +++++++++++- layouts/partials/head.html | 1 + 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2ed1ce6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM alpine:3.18 as build +# making my own image for hugo because there doesn't seem to be an official one in repo, lazy so we're going with alpine +RUN ["apk", "update"] +RUN ["apk", "add hugo"] +ADD . /root/ +WORKDIR /root +ARG WITH_COMMENTS=0 +RUN ["hugo", "--minify"] + +FROM nginx:1.25 + +RUN diff --git a/content/blog/blog_v2.md b/content/blog/blog_v2.md index cae377a..cdb27ad 100644 --- a/content/blog/blog_v2.md +++ b/content/blog/blog_v2.md @@ -21,9 +21,19 @@ Because I wanted to add comments. The way I'm planning on doing that will mean t ### Sounds like you've written a CMS so why is the static file hosting not a part of that? Because I'm not writing a CMS, I'm just writing the backend for comments and sticking some htmx stuff into the hugo template for a blog for the frontend. - + ## [Writing the Go backend] +### Why Go? + +### Annoyances +- Doesn't handle html multipart forms correctly(or the browser is wrong but I doubt that) +- Magic redirect when there's no trailing / + +### Anyways + +- yeeted oauth midway through + ## [Writing the Hugo templating frontend] ## [Setting up the docker Containers] diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 6202049..d8aa0b8 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -9,6 +9,7 @@ {{ cond (eq .Page.Kind "page") (safeHTML (printf "" .Site.BaseURL)) "" }} +