mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
✨ Feat: update the homepage README format to include links and the current year
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{- hugo.Store.Set "version" "v0.4.0-alpha-20250704082734-193fd193" -}}
|
||||
{{- hugo.Store.Set "version" "v0.4.0-alpha-20250721024521-a1cd700b" -}}
|
||||
{{- .Store.Set "this" dict -}}
|
||||
|
||||
{{- partial "init/detection-env.html" . -}}
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
# {{ .Site.Title }}
|
||||
# [{{ .Site.Title }}]({{ .Site.Home.Permalink }} "{{ T "single.home" }}")
|
||||
|
||||
> {{ .Site.Params.description }}
|
||||
|
||||
{{ $pages := .Site.Store.Get "mainSectionPages" -}}
|
||||
{{- $pages = where $pages "Draft" "eq" false -}}
|
||||
{{- $currentYear := now.Format "2006" -}}
|
||||
{{- T "section.archiveCounter" (len $pages) }} by [{{ .Site.Params.author.name }}]({{ .Site.Params.author.link }}).
|
||||
{{ range $pages.GroupByPublishDate "2006" }}
|
||||
{{- if ne .Key "0001" -}}
|
||||
{{- printf "\n## %v\n\n<details>\n<summary>%v</summary>\n\n" .Key (T "section.archiveCounter" .Pages.Len) -}}
|
||||
{{- $start := cond (eq .Key $currentYear) "<details open>" "<details>" -}}
|
||||
{{- printf "\n## %v\n\n%v\n<summary>%v</summary>\n\n" .Key $start (T "section.archiveCounter" .Pages.Len) -}}
|
||||
{{- range .Pages -}}
|
||||
{{- printf "- %v [%v](%v \"%v\")\n" (.PublishDate.Format "01-02") .Title .Permalink (.PublishDate.Format "2006-01-02 15:04:05") -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user