mirror of
https://github.com/Noettore/cocoa-eh-hugo-theme.git
synced 2025-10-15 11:46:41 +02:00
Add grouping by month and year in the blog section
This commit is contained in:
17
layouts/section/blog.html
Normal file
17
layouts/section/blog.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{{ partial "header.html" . }}
|
||||
<section class="main">
|
||||
<div class="container">
|
||||
<div class="content">
|
||||
<div class="page-heading">Blog</div>
|
||||
<ul>
|
||||
{{ range .Data.Pages.GroupByDate "Jan, 2006" "desc"}}
|
||||
{{ .Key }}
|
||||
{{ range .Pages.ByPublishDate }}
|
||||
{{ partial "li.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ partial "footer.html" . }}
|
Reference in New Issue
Block a user