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 }} {{ end }}
{{ $t := debug.Timer "single.categories" }} {{ $t := debug.Timer "single.categories" }}
{{ $tags := .GetTerms "categories" }} {{ $categories := .GetTerms "categories" }}
{{ with $tags }} {{ with $categories }}
<div class="mb-4 sm:mb-6 flex flex-wrap gap-2"> <div class="mb-4 sm:mb-6 flex flex-wrap gap-2">
{{ range . }} {{ range . }}
{{ $text := .LinkTitle }} {{ $text := .LinkTitle }}

View File

@ -1,17 +1,21 @@
{{ $documentation := site.GetPage "/documentation" }} {{ $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"> <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. */}} {{/* We currently have a slightly odd structure. */}}
{{ if eq $p site.Home }} {{ if eq $p site.Home }}
{{ $p = $documentation }} {{ $p = $documentation }}
{{ end }} {{ end }}
<li class="flex items-center"> <li class="flex items-center">
{{ $isLast := eq $i (sub (len $ancestors) 1) }}
<a <a
href="{{ $p.RelPermalink }}" 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 >{{ $p.LinkTitle }}</a
> >
{{ if ne $ $documentation }} {{ if ne $ $documentation }}