Testfix for loop restart #1
All checks were successful
release-tag / release-image (push) Successful in 1m54s

This commit is contained in:
2025-05-04 18:13:27 +02:00
parent 128aa11273
commit efac316b4c

View File

@@ -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"),
)
// LISTSeite: 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"))
// ARTICLEInstanz
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()