Update theme

This commit is contained in:
Joe Mooring 2024-11-19 04:02:24 -08:00 committed by GitHub
parent b63ef69f5b
commit 431b65d6bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 23 additions and 11 deletions

View File

@ -22,8 +22,15 @@
{{ $releases = where $releases "draft" false }}
{{ $releases = where $releases "prerelease" false }}
{{ range $releases | first 20 }}
{{ $publishDate := .published_at | time.AsTime }}
{{/* Correct the v0.138.0 release date. See https://github.com/gohugoio/hugo/issues/13066. */}}
{{ if eq .name "v0.138.0" }}
{{ $publishDate = "2024-11-06T11:22:34Z" | time.AsTime }}
{{ end }}
{{ $ctx := dict
"Date" (.published_at | time.AsTime)
"Date" $publishDate
"Title" (printf "Release %s" .name)
"Permalink" .html_url
"Section" "news"

View File

@ -21,14 +21,21 @@
{{- $releases = where $releases "draft" false }}
{{- $releases = where $releases "prerelease" false }}
{{- range $releases | first 20 }}
{{- $publishDate := .published_at | time.AsTime }}
{{- /* Correct the v0.138.0 release date. See https://github.com/gohugoio/hugo/issues/13066. */}}
{{- if eq .name "v0.138.0" }}
{{- $publishDate = "2024-11-06T11:22:34Z" | time.AsTime }}
{{- end }}
{{- $summary := printf
"Hugo %s was released on %s. See [release notes](%s) for details."
.tag_name
(.published_at | time.AsTime | time.Format "2 Jan 2006")
($publishDate | time.AsTime | time.Format "2 Jan 2006")
.html_url
}}
{{- $ctx := dict
"PublishDate" (.published_at | time.AsTime)
"PublishDate" $publishDate
"Title" (printf "Release %s" .name)
"Permalink" .html_url
"Section" "news"

View File

@ -16,7 +16,7 @@
<h2>{{ $heading }}</h2>
<ul>
{{- range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
{{- end }}

View File

@ -1 +1 @@
# github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af
# github.com/gohugoio/gohugoioTheme v0.0.0-20241119115653-b92d27ede3e1

4
go.mod
View File

@ -1,5 +1,5 @@
module github.com/gohugoio/hugoDocs
go 1.16
go 1.23.3
require github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af // indirect
require github.com/gohugoio/gohugoioTheme v0.0.0-20241119115653-b92d27ede3e1 // indirect

6
go.sum
View File

@ -1,4 +1,2 @@
github.com/gohugoio/gohugoioTheme v0.0.0-20241105040910-e9dac9458255 h1:kaSc7cVAifWPRzmECr7il0YXgXBM+H2ZrGcNnb03S8k=
github.com/gohugoio/gohugoioTheme v0.0.0-20241105040910-e9dac9458255/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af h1:H8Oa4AEJs2yz8w1Gq9hEGBJNukkKo05OAaIEsHMd63k=
github.com/gohugoio/gohugoioTheme v0.0.0-20241105120803-6c6e5fb8f8af/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=
github.com/gohugoio/gohugoioTheme v0.0.0-20241119115653-b92d27ede3e1 h1:d6XNQ4QYvJGIE8vMejUFTD89AWaPDywcLivzWpEU0qE=
github.com/gohugoio/gohugoioTheme v0.0.0-20241119115653-b92d27ede3e1/go.mod h1:GOYeAPQJ/ok8z7oz1cjfcSlsFpXrmx6VkzQ5RpnyhZM=