add vkv counter, vkv template update and remove debug prints

This commit is contained in:
Erik Winter 2020-12-31 15:06:45 +01:00
parent d0c5b78ca1
commit ab87b8ea09
2 changed files with 2 additions and 5 deletions

View File

@ -1,7 +1,6 @@
package site package site
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
"text/template" "text/template"
@ -38,9 +37,7 @@ func renderVKVNLPosts(targetPath string, tpl *template.Template, posts Posts, _
} }
if i != last { if i != last {
data.NextLink = posts[i-1].Link() data.NextLink = posts[i-1].Link()
fmt.Printf("first %d, last %d, i %d\n", first, last, i)
if i == last+1 { if i == last+1 {
fmt.Println(data.Title)
data.NextLink = "/" data.NextLink = "/"
} }
path = filepath.Join(targetPath, post.Year(), data.Slug) path = filepath.Join(targetPath, post.Year(), data.Slug)

View File

@ -10,8 +10,9 @@
body { margin: 40px auto; max-width: 650px; line-height: 1.6; font-size: 18px; color: #000; padding:0 10px; } body { margin: 40px auto; max-width: 650px; line-height: 1.6; font-size: 18px; color: #000; padding:0 10px; }
h1, h2, h3 { line-height:1.2; } h1, h2, h3 { line-height:1.2; }
a { color: #000; } a { color: #000; }
#footer { text-align: center; } #footer { margin-top: 25px; text-align: center; }
</style> </style>
<script data-goatcounter="https://vkv.goatcounter.com/count" async src="//gc.zgo.at/count.js"></script>
</head> </head>
<body> <body>
<article> <article>
@ -19,7 +20,6 @@
<a rel="author" href="https://erikwinter.nl/about">Erik Winter</a> - <a rel="author" href="https://erikwinter.nl/about">Erik Winter</a> -
<time pubdate="" datetime="{{ .DateShort }}">{{ .DateLong }}</time>. <time pubdate="" datetime="{{ .DateShort }}">{{ .DateLong }}</time>.
{{ .Content }} {{ .Content }}
<hr>
<p id="footer"> <p id="footer">
{{ if ne "" .PreviousLink -}}<a href="{{ .PreviousLink }}">Vorige</a>{{ end }} {{ if ne "" .PreviousLink -}}<a href="{{ .PreviousLink }}">Vorige</a>{{ end }}
{{ if ne "" .NextLink }}<a href="{{ .NextLink }}">Volgende</a>{{ end }} {{ if ne "" .NextLink }}<a href="{{ .NextLink }}">Volgende</a>{{ end }}