mirror of https://github.com/jpanther/congo.git
✨ Add option to toggle groupByYear on list pages
parent
e293f4c509
commit
b9f61f6896
|
@ -251,6 +251,7 @@ Many of the article defaults here can be overridden on a per article basis by sp
|
|||
|`article.showHeadingAnchors`|boolean|`true`|Whether or not heading anchor links are displayed alongside headings within articles.|
|
||||
|`article.showPagination`|boolean|`true`|Whether or not the next/previous article links are displayed in the article footer.|
|
||||
|`article.showReadingTime`|boolean|`true`|Whether or not article reading times are displayed.|
|
||||
|`list.groupByYear`|boolean|`true`|Whether or not articles are grouped under years in the article listing.|
|
||||
|`sitemap.excludedKinds`|array of strings|`["taxonomy", "term"]`|Kinds of content that should be excluded from the generated `/sitemap.xml` file. Refer to the [Hugo docs](https://gohugo.io/templates/section-templates/#page-kinds) for acceptable values.|
|
||||
|`taxonomy.showTermCount`|boolean|`true`|Whether or not the number of articles within a taxonomy term is displayed on the taxonomy listing.|
|
||||
|`fathomAnalytics.site`|string|_Not set_|The site code generated by Fathom Analytics for the website. Refer to the [Analytics docs](#analyticshtml) below for more details.|
|
||||
|
|
|
@ -26,6 +26,9 @@ title = "Congo"
|
|||
layout = "custom"
|
||||
showList = true
|
||||
|
||||
[params.list]
|
||||
groupByYear = false
|
||||
|
||||
[[menu.main]]
|
||||
name = "Blog"
|
||||
pageRef = "blog"
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
{{ partial "section-heading.html" . }}
|
||||
<section>
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
|
||||
<hr class="border-gray-400 border-dotted w-36" />
|
||||
{{ if $.Site.Params.list.groupByYear }}
|
||||
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
|
||||
<hr class="border-gray-400 border-dotted w-36" />
|
||||
{{ end }}
|
||||
{{ range .Pages }}
|
||||
{{ partial "article-link.html" . }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue