Meta Description Bugfix #2
All checks were successful
release-tag / release-image (push) Successful in 2m6s

This commit is contained in:
2025-05-05 21:21:57 +02:00
parent b1536ad724
commit c88cf623f0
3 changed files with 12 additions and 2 deletions

View File

@@ -98,7 +98,11 @@ func main() {
http.NotFound(w, r)
return
}
if err := tplList.ExecuteTemplate(w, "layout", articles); err != nil {
if err := tplList.ExecuteTemplate(w, "layout", article.ListPage{
Title: "Startseite",
Description: "Alle Artikel im Überblick",
Articles: articles,
}); err != nil {
http.Error(w, err.Error(), 500)
}
})

View File

@@ -14,3 +14,9 @@ type Article struct {
Body template.HTML
Description string
}
type ListPage struct {
Title string
Description string
Articles []Article
}

View File

@@ -1,6 +1,6 @@
{{ define "body" }}
<ul class="post-list">
{{ range . }}
{{ range .Articles }}
<li>
<a class="card" href="/post/{{ .Slug }}">
{{ if .Cover }}