diff --git a/website/themes/beastie/layouts/partials/press.html b/website/themes/beastie/layouts/partials/press.html
--- a/website/themes/beastie/layouts/partials/press.html
+++ b/website/themes/beastie/layouts/partials/press.html
@@ -16,14 +16,23 @@
{{ with $pressData.press }}
{{ $pressCounter := 0 }}
+ {{ $pressMonthCounter := 1 }}
+ {{ $pressMonthPrev := false }}
{{ range (sort .press "date" "desc") }}
{{ if lt $pressCounter 5 }}
+ {{ $pressMonthCur := dateFormat "2006-01" .date }}
+ {{ if eq $pressMonthCur $pressMonthPrev }}
+ {{ $pressMonthCounter = add $pressMonthCounter 1 }}
+ {{ else }}
+ {{ $pressMonthCounter = 1 }}
+ {{ end }}
{{ dateFormat "2006-01" .date }}
- {{ .name }}
+ {{ .name }}
+ {{ $pressCounter = add $pressCounter 1 }}
+ {{ $pressMonthPrev = $pressMonthCur }}
{{ end }}
- {{ $pressCounter = add $pressCounter 1 }}
{{ end }}
{{ end }}
diff --git a/website/themes/beastie/layouts/press/list.html b/website/themes/beastie/layouts/press/list.html
--- a/website/themes/beastie/layouts/press/list.html
+++ b/website/themes/beastie/layouts/press/list.html
@@ -39,7 +39,8 @@
{{ $yearsMonths = $yearsMonths | uniq }}
- {{ $pressCounter := 0 }}
+ {{ $pressMonthCounter := 1 }}
+ {{ $pressMonthPrev := false }}
{{ range $year := seq now.Year 2010 }}
{{ range $month := seq 12 1 }}
{{ $yearMonth := (printf "%d-%d" $year $month) }}
@@ -50,9 +51,15 @@
{{ with $pressData.press }}
{{ range (sort .press "date" "desc") }}
{{ if eq (dateFormat "2006-1" .date) $yearMonth }}
+ {{ $pressMonthCur := dateFormat "2006-01" .date }}
+ {{ if eq $pressMonthCur $pressMonthPrev }}
+ {{ $pressMonthCounter = add $pressMonthCounter 1 }}
+ {{ else }}
+ {{ $pressMonthCounter = 1 }}
+ {{ end }}
-
+
{{ .name }}
@@ -62,7 +69,7 @@
{{ .description | safeHTML}}
- {{ $pressCounter = add $pressCounter 1 }}
+ {{ $pressMonthPrev = $pressMonthCur }}
{{ end }}
{{ end }}
{{ end }}
diff --git a/website/themes/beastie/layouts/press/press.rss.xml b/website/themes/beastie/layouts/press/press.rss.xml
--- a/website/themes/beastie/layouts/press/press.rss.xml
+++ b/website/themes/beastie/layouts/press/press.rss.xml
@@ -12,28 +12,37 @@
https://www.FreeBSD.org/press/
+ {{ $pressMonthPrev := false }}
{{ $data := index .Site.Data "en" }}
{{ $pressData := $data.press }}
{{ with $pressData.press }}
{{ $pressCounter := 0 }}
- {{ range (sort .press "date" "desc") }}
- {{ if lt $pressCounter 10 }}
+ {{ $pressMonthCounter := 1 }}
+ {{ range (sort .press "date" "desc") }}
+ {{ if lt $pressCounter 10 }}
+ {{ $pressMonthCur := dateFormat "2006-01" .date }}
+ {{ if eq $pressMonthCur $pressMonthPrev }}
+ {{ $pressMonthCounter = add $pressMonthCounter 1 }}
+ {{ else }}
+ {{ $pressMonthCounter = 1 }}
+ {{ end }}
-
- {{ if .name }}
+ {{ if .name }}
{{ .name }}
- {{ end }}
- {{ if .description }}
+ {{ end }}
+ {{ if .description }}
{{ .description }}
- {{ end }}
- {{ absLangURL ($.Site.BaseURL) }}press/{{ dateFormat "2006-01" .date }}:{{ $pressCounter }}
- {{ absLangURL ($.Site.BaseURL) }}press/{{ dateFormat "2006-01" .date }}:{{ $pressCounter }}
+ {{ end }}
+ {{ absLangURL ($.Site.BaseURL) }}press/#{{ dateFormat "2006-01" .date }}:{{ $pressMonthCounter }}
+ {{ absLangURL ($.Site.BaseURL) }}press/#{{ dateFormat "2006-01" .date }}:{{ $pressMonthCounter }}
{{ dateFormat "2006-01-02" .date }}
- {{ end }}
+ {{ $pressMonthPrev = $pressMonthCur }}
+ {{ end }}
{{ $pressCounter = add $pressCounter 1 }}
{{ end }}
{{ end }}
diff --git a/website/themes/beastie/layouts/press/single.html b/website/themes/beastie/layouts/press/single.html
--- a/website/themes/beastie/layouts/press/single.html
+++ b/website/themes/beastie/layouts/press/single.html
@@ -39,7 +39,8 @@
{{ $yearsMonths = $yearsMonths | uniq }}
- {{ $pressCounter := 0 }}
+ {{ $pressMonthCounter := 1 }}
+ {{ $pressMonthPrev := false }}
{{ range $year := seq now.Year 2010 }}
{{ range $month := seq 12 1 }}
{{ $yearMonth := (printf "%d-%d" $year $month) }}
@@ -50,9 +51,15 @@
{{ with $pressData.press }}
{{ range (sort .press "date" "desc") }}
{{ if eq (dateFormat "2006-1" .date) $yearMonth }}
+ {{ $pressMonthCur := dateFormat "2006-01" .date }}
+ {{ if eq $pressMonthCur $pressMonthPrev }}
+ {{ $pressMonthCounter = add $pressMonthCounter 1 }}
+ {{ else }}
+ {{ $pressMonthCounter = 1 }}
+ {{ end }}
-
+
{{ .name }}
@@ -62,7 +69,7 @@
{{ .description | safeHTML}}
- {{ $pressCounter = add $pressCounter 1 }}
+ {{ $pressMonthPrev = $pressMonthCur }}
{{ end }}
{{ end }}
{{ end }}