divyam.dev/layouts/_default/list.html
Divyam Ahuja 2e5580024f
Some checks are pending
Deploy Hugo site to Pages / build (push) Waiting to run
Deploy Hugo site to Pages / deploy (push) Blocked by required conditions
feat: complete unified hugo and typst resume workflow with github actions
2026-05-08 14:55:12 +05:30

29 lines
773 B
HTML

{{ define "main" }}
<h1 class="page-title">{{ .Title }}</h1>
{{- if eq .Section "posts" }}
{{/* Blog archive listing */}}
{{- $posts := .Pages -}}
{{- $byYear := $posts.GroupByDate "2006" -}}
{{- range $byYear }}
<div class="archive-year">
<h3 class="year-heading">{{ .Key }}</h3>
<ul class="post-list">
{{- range .Pages }}
<li class="post-list-item">
<time class="post-date" datetime="{{ .Date.Format "2006-01-02" }}">
{{ .Date.Format "02 Jan" }}
</time>
<a href="{{ .Permalink }}" class="post-title-link">{{ .Title }}</a>
</li>
{{- end }}
</ul>
</div>
{{- end }}
{{- else }}
{{/* Generic page content */}}
<div class="post-content">
{{ .Content }}
</div>
{{- end }}
{{ end }}