aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/announcements.html
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-10-09 02:29:29 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-10-09 02:29:29 +0800
commit78189b25f3a92948ba214ced88a4239ce976c3c0 (patch)
treec9df8a25afdef00adb4a1331f62b8e97136491d5 /layouts/partials/announcements.html
parent5d02a919c6944b202d21c3ea0c633c51affae082 (diff)
downloadrhomepage-78189b25f3a92948ba214ced88a4239ce976c3c0.tar.gz
rhomepage-78189b25f3a92948ba214ced88a4239ce976c3c0.tar.xz
Add announcements section and OpenPGP key announcement
Diffstat (limited to 'layouts/partials/announcements.html')
-rw-r--r--layouts/partials/announcements.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/announcements.html b/layouts/partials/announcements.html
new file mode 100644
index 0000000..f7461f8
--- /dev/null
+++ b/layouts/partials/announcements.html
@@ -0,0 +1,15 @@
+{{- $pages := where site.RegularPages "Section" "announcements" -}}
+{{- with $pages.ByDate.Reverse }}
+<section class="announcements" aria-labelledby="announcements-title">
+ <h2 id="announcements-title">ANNOUNCEMENTS</h2>
+ <ol class="document-list announcement-list">
+ {{- range first site.Params.announcementLimit . }}
+ <li>
+ <time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
+ <a href="{{ .RelPermalink }}" lang="{{ .Params.lang }}">{{ .LinkTitle }}</a>
+ </li>
+ {{- end }}
+ </ol>
+ <p><a href="{{ "announcements/" | relURL }}">All announcements →</a></p>
+</section>
+{{- end }}