This commit is contained in:
@@ -174,8 +174,8 @@ func main() {
|
|||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
for a, b := range articles {
|
for a, b := range Xarticles {
|
||||||
articles[a].Counter = getTick(b.Slug)
|
Xarticles[a].Counter = getTick(b.Slug)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
@@ -183,7 +183,7 @@ func main() {
|
|||||||
if err := tplList.ExecuteTemplate(w, "layout", article.ListPage{
|
if err := tplList.ExecuteTemplate(w, "layout", article.ListPage{
|
||||||
Title: "Startseite",
|
Title: "Startseite",
|
||||||
Description: "Alle Artikel im Überblick",
|
Description: "Alle Artikel im Überblick",
|
||||||
Articles: articles,
|
Articles: Xarticles,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
http.Error(w, err.Error(), 500)
|
http.Error(w, err.Error(), 500)
|
||||||
}
|
}
|
||||||
@@ -191,7 +191,7 @@ func main() {
|
|||||||
|
|
||||||
mux.HandleFunc("/post/", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/post/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
slug := strings.TrimPrefix(r.URL.Path, "/post/")
|
slug := strings.TrimPrefix(r.URL.Path, "/post/")
|
||||||
for _, a := range articles {
|
for _, a := range Xarticles {
|
||||||
if a.Slug == slug {
|
if a.Slug == slug {
|
||||||
IncTick(slug)
|
IncTick(slug)
|
||||||
t := getTick(slug)
|
t := getTick(slug)
|
||||||
|
Reference in New Issue
Block a user