Add site search (Pagefind)

Client-side index generated after the Hugo build; search box in the
header, results page with a section filter.

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:31:00 +02:00
co-authored by Claude Opus 5.5
parent 8883befad8
commit fda5359932
17 changed files with 100 additions and 16 deletions
+2 -2
View File
@@ -2,13 +2,13 @@
{{ $m := .machine }}
{{ $labels := dict "photos" "Photos" "adverts" "Adverts" "hardware" "Hardware" "connectors" "Connectors" "software" "Software" "emulators" "Emulators" "links" "Links" "docs" "Docs" "videos" "Videos" "comments" "Comments" }}
<header class="machine-header">
<p class="crumbs">
<p class="crumbs" data-pagefind-ignore>
<a href="{{ (site.GetPage "/museum").RelPermalink }}">Museum</a>
{{ with $m.GetTerms "categories" }}{{ range first 1 . }} › <a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>{{ end }}{{ end }}
{{ with $m.Params.company }}{{ with site.GetPage . }} › <a href="{{ .RelPermalink }}">{{ .Title }}</a>{{ end }}{{ end }}
</p>
<h1>{{ with $m.Params.logo }}<img class="logo" src="{{ . }}" alt="">{{ end }}{{ $m.Title }}</h1>
<nav class="tabs">
<nav class="tabs" data-pagefind-ignore>
<a href="{{ $m.RelPermalink }}"{{ if not $.tab }} class="active"{{ end }}>System info</a>
{{ range $m.Params.tabs }}
<a href="{{ $m.RelPermalink }}{{ . }}/"{{ if eq . $.tab }} class="active"{{ end }}>{{ index $labels . }}</a>