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 -------------------------
|
// --- Verzeichnisse konfigurierbar machen -------------------------
|
||||||
contentDir := os.Getenv("BLOG_CONTENT_DIR")
|
contentDir := os.Getenv("BLOG_CONTENT_DIR")
|
||||||
if contentDir == "" {
|
if contentDir == "" {
|
||||||
contentDir = "content" // Fallback für local run
|
contentDir = "/app/content" // Fallback für local run
|
||||||
}
|
}
|
||||||
|
|
||||||
staticDir := os.Getenv("BLOG_STATIC_DIR")
|
staticDir := os.Getenv("BLOG_STATIC_DIR")
|
||||||
if staticDir == "" {
|
if staticDir == "" {
|
||||||
staticDir = "internal/web/static"
|
staticDir = "/app/internal/web/static"
|
||||||
}
|
}
|
||||||
|
|
||||||
pagesDir := os.Getenv("BLOG_PAGES_DIR")
|
pagesDir := os.Getenv("BLOG_PAGES_DIR")
|
||||||
if staticDir == "" {
|
if staticDir == "" {
|
||||||
staticDir = "pages"
|
staticDir = "/app/pages"
|
||||||
}
|
}
|
||||||
|
|
||||||
funcs := template.FuncMap{
|
funcs := template.FuncMap{
|
||||||
@@ -64,19 +64,19 @@ func main() {
|
|||||||
// Basislayout zuerst parsen
|
// Basislayout zuerst parsen
|
||||||
layout := template.Must(
|
layout := template.Must(
|
||||||
template.New("base").Funcs(funcs).
|
template.New("base").Funcs(funcs).
|
||||||
ParseFiles("internal/web/templates/base.html"),
|
ParseFiles("/app/internal/web/templates/base.html"),
|
||||||
)
|
)
|
||||||
|
|
||||||
// LIST‑Seite: base + list.html
|
// LIST‑Seite: base + list.html
|
||||||
tplList = template.Must(layout.Clone())
|
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
|
// ARTICLE‑Instanz
|
||||||
tplArticle = template.Must(layout.Clone())
|
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())
|
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()
|
mux := http.NewServeMux()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user