template: Make projects sort by date
This commit is contained in:
parent
9afd55a603
commit
2fd22e30ce
4 changed files with 6 additions and 4 deletions
|
|
@ -9,10 +9,10 @@
|
|||
</div>
|
||||
{{- end }}
|
||||
|
||||
{{- range site.Params.homepage_categories }}
|
||||
{{- range $config := site.Params.homepage_categories }}
|
||||
<h2>{{ .title }}</h2>
|
||||
{{- range first .count (where site.RegularPages "Section" "==" .key) }}
|
||||
{{ partial "card.html" . }}
|
||||
{{- range $entry := first $config.count (where site.RegularPages "Section" "==" $config.key) }}
|
||||
{{ partial "card.html" $entry }}
|
||||
{{- end }}
|
||||
|
||||
<div class="pagination-links">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<div class="card">
|
||||
{{- if .Title }}<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>{{- end }}
|
||||
{{- if .Date }}<strong>{{ .Date.Format "2006-01-02" }}</strong>{{- end }}
|
||||
{{- if and .Date (not (isset (index .Ancestors 0).Params "hide_date")) }}<strong>{{ .Date.Format "2006-01-02" }}</strong>{{- end }}
|
||||
|
||||
<div class="summary">
|
||||
{{ .Summary | safeHTML }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue