aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--archetypes/announcement.md8
-rw-r--r--content/announcements/_index.md9
-rw-r--r--content/announcements/openpgp-key-2026-2028/index.md17
-rw-r--r--hugo.toml3
-rw-r--r--layouts/announcements/list.html17
-rw-r--r--layouts/announcements/single.html17
-rw-r--r--layouts/baseof.html2
-rw-r--r--layouts/home.html1
-rw-r--r--layouts/home.rss.xml2
-rw-r--r--layouts/partials/announcements.html15
-rw-r--r--layouts/partials/primary-nav.html1
-rw-r--r--static/style.css12
13 files changed, 109 insertions, 7 deletions
diff --git a/README.md b/README.md
index 750c513..11051c4 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,18 @@ make clean
The source repository URL, per-file Git base URL, and public email are configured once in `hugo.toml`.
+## Announcements
+
+Announcements are separate from journal entries and technical notes. The home page shows the latest three notices above RECENT, with the full archive at `/announcements/`. Announcements and journal entries share `/rss.xml`; RECENT continues to show only journal entries and notes.
+
+Create a notice with:
+
+```sh
+hugo new content --kind announcement announcements/your-announcement/index.md
+```
+
+Set the title and `created` publication date, keep `updated` current when editing, and write the notice in the generated Markdown file. The home page limit is configured by `params.announcementLimit` in `hugo.toml`.
+
## Licensing
Site code and templates are licensed under `GPL-3.0-or-later`; see `COPYING`.
diff --git a/archetypes/announcement.md b/archetypes/announcement.md
new file mode 100644
index 0000000..47f0e34
--- /dev/null
+++ b/archetypes/announcement.md
@@ -0,0 +1,8 @@
+---
+title: "{{ replace .File.ContentBaseName "-" " " | title }}"
+slug: "{{ .File.ContentBaseName }}"
+lang: en
+created: {{ time.Format "2006-01-02" .Date }}
+updated: {{ time.Format "2006-01-02" .Date }}
+license: CC-BY-SA-4.0
+---
diff --git a/content/announcements/_index.md b/content/announcements/_index.md
new file mode 100644
index 0000000..64b5772
--- /dev/null
+++ b/content/announcements/_index.md
@@ -0,0 +1,9 @@
+---
+title: "ANNOUNCEMENTS"
+lang: en
+url: "/announcements/"
+description: "Public notices about OpenPGP keys, contact details, and this site."
+license: CC-BY-SA-4.0
+---
+
+Public notices about my OpenPGP keys, contact details, and this site.
diff --git a/content/announcements/openpgp-key-2026-2028/index.md b/content/announcements/openpgp-key-2026-2028/index.md
new file mode 100644
index 0000000..8933853
--- /dev/null
+++ b/content/announcements/openpgp-key-2026-2028/index.md
@@ -0,0 +1,17 @@
+---
+title: "OpenPGP public key published (2026–2028)"
+slug: "openpgp-key-2026-2028"
+lang: en
+created: 2026-10-09
+updated: 2026-10-09
+description: "Publication of my OpenPGP public key for 2026–2028 and its full fingerprint."
+license: CC-BY-SA-4.0
+---
+
+I have published my OpenPGP public key for 2026–2028. It is available from this site:
+
+- Public key: [richard-2026-2028.asc](/richard-2026-2028.asc)
+- Fingerprint: `0D08 88B1 AC2E D6B8 29F5 D211 AEB3 28BC 83BC 2EDA`
+- Validity: 2026–2028
+
+The current public key and fingerprint are also linked below my introduction on the home page. Future key changes will be announced here.
diff --git a/hugo.toml b/hugo.toml
index 4766485..7d2a376 100644
--- a/hugo.toml
+++ b/hugo.toml
@@ -11,12 +11,13 @@ enableRobotsTXT = false
[params]
owner = "Richard Qin"
identity = "richard@web:~/"
- description = "Richard Qin's journal, technical notes, projects, and links."
+ description = "Richard Qin's journal, technical notes, announcements, projects, and links."
email = "richard.qin.001@gmail.com"
sourceURL = "https://git.richardqin.org/rhomepage"
gitBase = "https://git.richardqin.org/rhomepage/tree"
contentLicense = "CC BY-SA 4.0"
recentLimit = 20
+ announcementLimit = 3
[frontmatter]
date = ["created"]
diff --git a/layouts/announcements/list.html b/layouts/announcements/list.html
new file mode 100644
index 0000000..ed2aed8
--- /dev/null
+++ b/layouts/announcements/list.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+ <article lang="{{ default "en" .Params.lang }}">
+ <header class="document-header">
+ <h1>{{ .Title }}</h1>
+ {{ partial "document-view.html" . }}
+ </header>
+ {{ .Content }}
+ <ol class="document-list announcement-list">
+ {{- range .RegularPages.ByDate.Reverse }}
+ <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>
+ </article>
+{{ end }}
diff --git a/layouts/announcements/single.html b/layouts/announcements/single.html
new file mode 100644
index 0000000..45782e1
--- /dev/null
+++ b/layouts/announcements/single.html
@@ -0,0 +1,17 @@
+{{ define "main" }}
+ <article lang="{{ .Params.lang }}">
+ <header class="document-header">
+ <h1>{{ .Title }}</h1>
+ <dl class="document-meta">
+ <div><dt>published</dt><dd><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time></dd></div>
+ <div><dt>updated</dt><dd><time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod.Format "2006-01-02" }}</time></dd></div>
+ <div><dt>license</dt><dd>{{ .Params.license }}</dd></div>
+ </dl>
+ {{ partial "document-view.html" . }}
+ </header>
+ {{ .Content }}
+ <nav class="document-navigation" aria-label="Announcements archive">
+ <a href="{{ "announcements/" | relURL }}">← All announcements</a>
+ </nav>
+ </article>
+{{ end }}
diff --git a/layouts/baseof.html b/layouts/baseof.html
index edc5cbe..83a567e 100644
--- a/layouts/baseof.html
+++ b/layouts/baseof.html
@@ -9,7 +9,7 @@
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }} | {{ site.Title }}{{ end }}</title>
<meta name="description" content="{{ $description }}">
<link rel="canonical" href="{{ .Permalink }}">
- <link rel="alternate" type="application/rss+xml" title="{{ site.Title }} Journal" href="{{ "rss.xml" | absURL }}">
+ <link rel="alternate" type="application/rss+xml" title="{{ site.Title }} Journal and Announcements" href="{{ "rss.xml" | absURL }}">
<link rel="stylesheet" href="{{ "style.css" | relURL }}">
<link rel="icon" href="{{ "favicon.ico" | relURL }}" sizes="any">
</head>
diff --git a/layouts/home.html b/layouts/home.html
index 826997b..a1245df 100644
--- a/layouts/home.html
+++ b/layouts/home.html
@@ -4,6 +4,7 @@
<p class="home-intro">I'm an undergraduate at the School of Information, Renmin University of China, and a free software advocate. My current interests are MLSys, compilers, and operating systems. You can reach me by <a href="mailto:{{ site.Params.email }}">email</a>.</p>
<p class="home-pgp"><a href="{{ "/richard-2026-2028.asc" | relURL }}">OpenPGP</a> fingerprint: <samp>0D08 88B1 AC2E D6B8 29F5 D211 AEB3 28BC 83BC 2EDA</samp> (2026–2028)</p>
{{ partial "primary-nav.html" . }}
+ {{ partial "announcements.html" . }}
{{ partial "recent.html" . }}
</article>
{{ end }}
diff --git a/layouts/home.rss.xml b/layouts/home.rss.xml
index 8ec9c25..f3d7ce3 100644
--- a/layouts/home.rss.xml
+++ b/layouts/home.rss.xml
@@ -1,4 +1,4 @@
-{{- $pages := where site.RegularPages "Section" "journal" -}}
+{{- $pages := where site.RegularPages "Section" "in" (slice "journal" "announcements") -}}
{{- $pages = $pages.ByDate.Reverse -}}
{{ printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
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 }}
diff --git a/layouts/partials/primary-nav.html b/layouts/partials/primary-nav.html
index 05c535b..4a94d92 100644
--- a/layouts/partials/primary-nav.html
+++ b/layouts/partials/primary-nav.html
@@ -1,4 +1,5 @@
<nav class="site-nav" aria-label="Primary">
+ <a href="{{ "/announcements/" | relURL }}"{{ if eq .Section "announcements" }} aria-current="page"{{ end }}>announcements/</a>
<a href="{{ "/journal/" | relURL }}"{{ if eq .Section "journal" }} aria-current="page"{{ end }}>journal/</a>
<a href="{{ "/notes/" | relURL }}"{{ if eq .Section "notes" }} aria-current="page"{{ end }}>notes/</a>
<a href="{{ "/projects/" | relURL }}"{{ if eq .Section "projects" }} aria-current="page"{{ end }}>projects/</a>
diff --git a/static/style.css b/static/style.css
index d5477c6..2dc2af2 100644
--- a/static/style.css
+++ b/static/style.css
@@ -222,13 +222,15 @@ a:focus-visible {
font-size: 0.875rem;
}
-.home-page .recent {
+.home-page .recent,
+.home-page .announcements {
margin-top: 2.5rem;
padding-top: 0.75rem;
border-top: 1px solid var(--border);
}
-.home-page .recent h2 {
+.home-page .recent h2,
+.home-page .announcements h2 {
margin-top: 0;
font-size: 1.125rem;
}
@@ -281,7 +283,8 @@ a:focus-visible {
align-items: baseline;
}
-.journal-list li {
+.journal-list li,
+.announcement-list li {
display: grid;
grid-template-columns: max-content minmax(0, 1fr);
gap: 0.25rem 1rem;
@@ -521,7 +524,8 @@ img {
.recent .document-list li,
.updates-list .document-list li,
- .journal-list li {
+ .journal-list li,
+ .announcement-list li {
display: block;
}