Adjust markup to make it easier to match in Algolia

This commit is contained in:
Bjørn Erik Pedersen 2025-02-11 17:16:12 +01:00
parent 5accec5f16
commit ba73ce646b
No known key found for this signature in database
2 changed files with 9 additions and 5 deletions

View File

@ -10,8 +10,8 @@
{{ end }}
{{ $t := debug.Timer "single.categories" }}
{{ $tags := .GetTerms "categories" }}
{{ with $tags }}
{{ $categories := .GetTerms "categories" }}
{{ with $categories }}
<div class="mb-4 sm:mb-6 flex flex-wrap gap-2">
{{ range . }}
{{ $text := .LinkTitle }}

View File

@ -1,17 +1,21 @@
{{ $documentation := site.GetPage "/documentation" }}
<nav aria-label="breadcrumb" class="flex">
<nav aria-label="breadcrumb" class="flex breadcrumbs">
<ol class="inline-flex items-center flex-wrap tracking-tight">
{{ range $i, $p := .Ancestors.Reverse }}
{{ $ancestors := .Ancestors.Reverse }}
{{ range $i, $p := $ancestors }}
{{/* We currently have a slightly odd structure. */}}
{{ if eq $p site.Home }}
{{ $p = $documentation }}
{{ end }}
<li class="flex items-center">
{{ $isLast := eq $i (sub (len $ancestors) 1) }}
<a
href="{{ $p.RelPermalink }}"
class="truncate text-blue-600 hover:text-blue-500"
class="truncate text-blue-600 hover:text-blue-500 {{ if $isLast }}
current-section
{{ end }}"
>{{ $p.LinkTitle }}</a
>
{{ if ne $ $documentation }}