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)
|
http.NotFound(w, r)
|
||||||
return
|
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)
|
http.Error(w, err.Error(), 500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@@ -14,3 +14,9 @@ type Article struct {
|
|||||||
Body template.HTML
|
Body template.HTML
|
||||||
Description string
|
Description string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ListPage struct {
|
||||||
|
Title string
|
||||||
|
Description string
|
||||||
|
Articles []Article
|
||||||
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{{ define "body" }}
|
{{ define "body" }}
|
||||||
<ul class="post-list">
|
<ul class="post-list">
|
||||||
{{ range . }}
|
{{ range .Articles }}
|
||||||
<li>
|
<li>
|
||||||
<a class="card" href="/post/{{ .Slug }}">
|
<a class="card" href="/post/{{ .Slug }}">
|
||||||
{{ if .Cover }}
|
{{ if .Cover }}
|
||||||
|
Reference in New Issue
Block a user