From 56de4bacdb0e56462b6643bb831c61afc85a61e3 Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sun, 30 Nov 2025 12:09:55 -0500 Subject: [PATCH 1/2] Limit number of tags shown --- layouts/blog/list.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/blog/list.html b/layouts/blog/list.html index c6d24c2..f8cd8ce 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -31,11 +31,15 @@

{{ .Title }}

+ {{ $tag_count := 0 }} {{ range .Params.tags }} + {{ if lt $tag_count 2 }} {{ $name := . }} {{ with $.Site.GetPage (printf "/tags/%s" (. | urlize)) }} #{{ $name }} {{ end }} + {{ $tag_count = add $tag_count 1 }} + {{ end }} {{ end }}

From ded609da7dfd3eec8f1002560bfb00bc66db2c0b Mon Sep 17 00:00:00 2001 From: Brandon Rozek Date: Sun, 30 Nov 2025 14:36:52 -0500 Subject: [PATCH 2/2] Added support for entity linking in tags --- layouts/tags/list.html | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/layouts/tags/list.html b/layouts/tags/list.html index 95853fb..4d734ca 100644 --- a/layouts/tags/list.html +++ b/layouts/tags/list.html @@ -2,9 +2,32 @@ {{ partial "header.html" . }}
- Here you'll find {{ len .Pages | lang.FormatNumber 0 }} posts - about {{ .Title }} . +

Here you'll find {{ len .Pages | lang.FormatNumber 0 }} post{{if gt (len .Pages) 1}}s{{end}} + about {{ .Title }}.

+ + + {{ $tagKey := .Title | urlize }} + {{ with index .Site.Data.wikidata_mappings $tagKey }} +
+ {{ if eq (len .entities) 1 }} + {{ $entity := index .entities 0 }} +

+ Same as {{ $entity.id }}, {{ $entity.description }}. +

+ {{ else }} +

These posts may refer to:

+
    + {{ range .entities }} +
  • + {{ .id }} – {{ .description }} +
  • + {{ end }} +
+ {{ end }}
+ {{ end }} +
+
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "2006"}} @@ -19,4 +42,4 @@ {{ end }}
-{{ end }} +{{ end }} \ No newline at end of file