From efac316b4c3529cf8fe819708fdad65eccc785a9 Mon Sep 17 00:00:00 2001 From: jbergner Date: Sun, 4 May 2025 18:13:27 +0200 Subject: [PATCH] Testfix for loop restart #1 --- cmd/blog/main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/blog/main.go b/cmd/blog/main.go index 923bd19..aecca37 100644 --- a/cmd/blog/main.go +++ b/cmd/blog/main.go @@ -44,17 +44,17 @@ func main() { // --- Verzeichnisse konfigurierbar machen ------------------------- contentDir := os.Getenv("BLOG_CONTENT_DIR") if contentDir == "" { - contentDir = "content" // Fallback für local run + contentDir = "/app/content" // Fallback für local run } staticDir := os.Getenv("BLOG_STATIC_DIR") if staticDir == "" { - staticDir = "internal/web/static" + staticDir = "/app/internal/web/static" } pagesDir := os.Getenv("BLOG_PAGES_DIR") if staticDir == "" { - staticDir = "pages" + staticDir = "/app/pages" } funcs := template.FuncMap{ @@ -64,19 +64,19 @@ func main() { // Basislayout zuerst parsen layout := template.Must( template.New("base").Funcs(funcs). - ParseFiles("internal/web/templates/base.html"), + ParseFiles("/app/internal/web/templates/base.html"), ) // LIST‑Seite: base + list.html tplList = template.Must(layout.Clone()) - template.Must(tplList.Funcs(funcs).ParseFiles("internal/web/templates/list.html")) + template.Must(tplList.Funcs(funcs).ParseFiles("/app/internal/web/templates/list.html")) // ARTICLE‑Instanz tplArticle = template.Must(layout.Clone()) - template.Must(tplArticle.Funcs(funcs).ParseFiles("internal/web/templates/article.html")) + template.Must(tplArticle.Funcs(funcs).ParseFiles("/app/internal/web/templates/article.html")) tplPage := template.Must(layout.Clone()) - template.Must(tplPage.ParseFiles("internal/web/templates/page.html")) + template.Must(tplPage.ParseFiles("/app/internal/web/templates/page.html")) mux := http.NewServeMux()