Posts: author pages, linked from the author name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 20:14:39 +02:00
co-authored by Claude Opus 5.5
parent d9227e15f3
commit 8883befad8
7 changed files with 27 additions and 4 deletions
+2 -1
View File
@@ -21,7 +21,8 @@ Content pages are Markdown with YAML front matter and can be corrected by hand,
make post NAME=my-title
creates `content/post/<today>-my-title.md` (any `.md` file in `content/post/` is a post). The
date comes from the file name unless `date:` is set; `author:` is optional. For a banner, put an
date comes from the file name unless `date:` is set; `author:` is optional; the name
links to `/author/<name>/`, which lists all posts by that author. For a banner, put an
image under `static/media/` and set `banner: /media/....jpg`. Write the text in Markdown and
remove `draft: true` to publish. The five most recent posts appear on the home page with their
banner, date, author and summary (`summary:` in the front matter, or the text before
+4
View File
@@ -5,6 +5,8 @@ locale = "en"
disableKinds = ["rss", "sitemap"]
# pages keep working when the site is served from a sub-directory
relativeURLs = true
# keep author names and taxonomy terms as written (olipix, not Olipix)
capitalizeListTitles = false
# a post named 2026-10-11-my-title.md gets its date from the file name (and the URL /post/my-title/)
[frontmatter]
@@ -23,6 +25,8 @@ relativeURLs = true
topic = "topics"
rubric = "rubrics"
collection = "collections"
# posts: `author: name` in the front matter; all posts of an author at /author/name/
author = "author"
[menus]
[[menus.main]]
+1 -1
View File
@@ -4,7 +4,7 @@
{{ end }}
<div>
<h3><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .Params.author }}{{ if not $.Date.IsZero }} · {{ end }}{{ . }}{{ end }}</p>
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .GetTerms "author" }}{{ if not $.Date.IsZero }} · {{ end }}{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}{{ end }}</p>
<div class="summary">{{ .Summary }}</div>
{{ if .Truncated }}<p><a href="{{ .RelPermalink }}">Read more →</a></p>{{ end }}
</div>
+1 -1
View File
@@ -1,2 +1,2 @@
{{- $labels := dict "category" "category" "type" "type" "origin" "country" "year" "year" "cpu" "CPU" "tag" "software tag" "topic" "topic" "rubric" "rubric" "collection" "collection" -}}
{{- $labels := dict "category" "category" "type" "type" "origin" "country" "year" "year" "cpu" "CPU" "tag" "software tag" "topic" "topic" "rubric" "rubric" "collection" "collection" "author" "author" -}}
{{- index $labels . | default . -}}
+10
View File
@@ -0,0 +1,10 @@
{{ define "title" }}Authors · {{ site.Title }}{{ end }}
{{ define "main" }}
<p class="crumbs">{{ with site.GetPage "/post" }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}</p>
<h1>Authors</h1>
<ul class="columns">
{{ range .Data.Terms.Alphabetical }}
<li><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> <small>({{ .Count }})</small></li>
{{ end }}
</ul>
{{ end }}
+8
View File
@@ -0,0 +1,8 @@
{{ define "title" }}Posts by {{ .Title }} · {{ site.Title }}{{ end }}
{{ define "main" }}
<p class="crumbs">{{ with site.GetPage "/post" }}<a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }} › <a href="{{ .Parent.RelPermalink }}">Authors</a></p>
<h1>Posts by {{ .Title }}</h1>
<div class="posts">
{{ range .Pages.ByDate.Reverse }}{{ partial "post-summary.html" . }}{{ end }}
</div>
{{ end }}
+1 -1
View File
@@ -2,7 +2,7 @@
<article class="post">
<p class="crumbs"><a href="{{ .Parent.RelPermalink }}">{{ .Parent.Title }}</a></p>
<h1>{{ .Title }}</h1>
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .Params.author }}{{ if not $.Date.IsZero }} · {{ end }}{{ . }}{{ end }}</p>
<p class="meta">{{ if not .Date.IsZero }}<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2 January 2006" }}</time>{{ end }}{{ with .GetTerms "author" }}{{ if not $.Date.IsZero }} · {{ end }}{{ partial "terms.html" (dict "page" $ "taxonomy" "author") }}{{ end }}</p>
{{ with partial "banner.html" (dict "page" . "width" 1000) }}<img class="post-banner" src="{{ . }}" alt="">{{ end }}
<div class="content">{{ .Content }}</div>
<nav class="prev-next">