summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2023-10-06 14:35:32 +0200
committerjaseg <git@jaseg.de>2023-10-06 14:35:32 +0200
commit2fd22e30ce176d8d8a641fd371ad1623b082eaaf (patch)
treea041f0bba09b9a37650cae0ef3ae3b52c00d65c8
parent9afd55a603ddfabbfa79b66bbc8876d90cf9f5b8 (diff)
downloadblog-2fd22e30ce176d8d8a641fd371ad1623b082eaaf.tar.gz
blog-2fd22e30ce176d8d8a641fd371ad1623b082eaaf.tar.bz2
blog-2fd22e30ce176d8d8a641fd371ad1623b082eaaf.zip
template: Make projects sort by date
-rw-r--r--content/projects/_index.rst1
-rw-r--r--content/projects/kimesh/index.rst1
-rw-r--r--themes/conspiracy/layouts/index.html6
-rw-r--r--themes/conspiracy/layouts/partials/card.html2
4 files changed, 6 insertions, 4 deletions
diff --git a/content/projects/_index.rst b/content/projects/_index.rst
index c975627..9f9d49b 100644
--- a/content/projects/_index.rst
+++ b/content/projects/_index.rst
@@ -1,5 +1,6 @@
---
title: Projects
+hide_date: true
---
I maintain a number of open-source projects. Most of these I started out of some personal need or interest.
I strive to keep all of them up to date and maintained, so if you notice an issue with one of them, please
diff --git a/content/projects/kimesh/index.rst b/content/projects/kimesh/index.rst
index 7688757..8613e3c 100644
--- a/content/projects/kimesh/index.rst
+++ b/content/projects/kimesh/index.rst
@@ -1,5 +1,6 @@
---
title: "KiMesh"
+date: 2023-10-04T23:42:00+02:00
external_links:
- name: Sources
url: "https://git.jaseg.de/kimesh.git"
diff --git a/themes/conspiracy/layouts/index.html b/themes/conspiracy/layouts/index.html
index ab68f27..808ddc8 100644
--- a/themes/conspiracy/layouts/index.html
+++ b/themes/conspiracy/layouts/index.html
@@ -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">
diff --git a/themes/conspiracy/layouts/partials/card.html b/themes/conspiracy/layouts/partials/card.html
index 65ea2e7..d0d94c3 100644
--- a/themes/conspiracy/layouts/partials/card.html
+++ b/themes/conspiracy/layouts/partials/card.html
@@ -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 }}