Closed kranurag78 closed 1 year ago
Awesome 🥳
Thanks for your advice but I think it will be nicer if your PR be like:
{{ define "main" }}
<main class="container mx-auto">
{{ if isset .Data "Term" }}
<h2 class="text-4xl mt-8 mb-8">{{ .Data.Singular | title }} - "{{ .Data.Term }}"</h2>
{{ else }}
<h2 class="text-4xl mt-8 mb-8">{{ .Title }}</h2>
{{ end }}
<div class="mt-8">
{{ range .Data.Pages.GroupByDate "2006" }}
<h3 class="text-3xl font-medium mb-2 mt-4">
<a href="#{{ .Key }}">{{ .Key }}</a>
</h3>
{{ range .Pages }}
{{ partial "item.html" . }}
{{ end }}
{{ end }}
</div>
</main>
{{ end }}
Happy Hacking 🌴
completed with https://github.com/mivinci/hugo-theme-minima/pull/50
Hey there, Thanks for the nice theme. It will be nice to seperate content year wise on the page list.
Here's how I'm implementing it locally
`list.html` ```html {{ define "main" }}{{ .Data.Singular | title }} - "{{ .Data.Term }}"
{{ else }}{{ .Title }}
{{ end }}{{ .Key }}
{{ range .Pages }} {{ partial "item.html" . }} {{ end }} {{ end }}Let me know if there's feedback w.r.t the changes. I can send a PR if you approve.
Happy Vacation 🌴