Meta Description Bugfix #2
All checks were successful
release-tag / release-image (push) Successful in 2m6s
All checks were successful
release-tag / release-image (push) Successful in 2m6s
This commit is contained in:
@@ -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)
|
||||
}
|
||||
})
|
||||
|
@@ -14,3 +14,9 @@ type Article struct {
|
||||
Body template.HTML
|
||||
Description string
|
||||
}
|
||||
|
||||
type ListPage struct {
|
||||
Title string
|
||||
Description string
|
||||
Articles []Article
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{{ define "body" }}
|
||||
<ul class="post-list">
|
||||
{{ range . }}
|
||||
{{ range .Articles }}
|
||||
<li>
|
||||
<a class="card" href="/post/{{ .Slug }}">
|
||||
{{ if .Cover }}
|
||||
|
Reference in New Issue
Block a user