Testfix for loop restart #1
All checks were successful
release-tag / release-image (push) Successful in 1m54s
All checks were successful
release-tag / release-image (push) Successful in 1m54s
This commit is contained in:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user