From 76019944ffd2357f5ccc0f5193dbf7b0bfbefeac Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Thu, 9 Jan 2025 13:18:09 +0100 Subject: [PATCH] Fix typesense on prod --- layouts/_default/list.typesense.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/layouts/_default/list.typesense.json b/layouts/_default/list.typesense.json index 90296f3210..26f9402dac 100644 --- a/layouts/_default/list.typesense.json +++ b/layouts/_default/list.typesense.json @@ -24,12 +24,12 @@ {{- if and (eq (path.Ext (index .Params.videos 0)) ".webm") (eq (path.Ext (index .Params.videos 1)) ".mp4") -}} {{- if eq ((index .Params.videos 0) | printf "%.1s") "/" -}} - {{- $.Scratch.Set "webm" (printf "..%s" (index .Params.videos 0)) -}} + {{- $.Scratch.Set "webm" (printf "%s" (index .Params.videos 0)) -}} {{- else -}} {{- $.Scratch.Set "webm" (printf "%s" (index .Params.videos 0)) -}} {{- end -}} {{- if eq ((index .Params.videos 1) | printf "%.1s") "/" -}} - {{- $.Scratch.Set "mp4" (printf "..%s" (index .Params.videos 1)) -}} + {{- $.Scratch.Set "mp4" (printf "%s" (index .Params.videos 1)) -}} {{- else -}} {{- $.Scratch.Set "mp4" (printf "%s" (index .Params.videos 1)) -}} {{- end -}} @@ -37,12 +37,12 @@ {{- else if and (eq (path.Ext (index .Params.videos 1)) ".webm") (eq (path.Ext (index .Params.videos 0)) ".mp4") -}} {{- if eq ((index .Params.videos 1) | printf "%.1s") "/" -}} - {{- $.Scratch.Set "webm" (printf "..%s" (index .Params.videos 1)) -}} + {{- $.Scratch.Set "webm" (printf "%s" (index .Params.videos 1)) -}} {{- else -}} {{- $.Scratch.Set "webm" (printf "%s" (index .Params.videos 1)) -}} {{- end -}} {{- if eq ((index .Params.videos 0) | printf "%.1s") "/" -}} - {{- $.Scratch.Set "mp4" (printf "..%s" (index .Params.videos 0)) -}} + {{- $.Scratch.Set "mp4" (printf "%s" (index .Params.videos 0)) -}} {{- else -}} {{- $.Scratch.Set "mp4" (printf "%s" (index .Params.videos 0)) -}} {{- end -}} @@ -57,7 +57,7 @@ {{- $image_extensions := slice ".png" ".jpg" ".jpeg" ".svg" -}} {{- if in $image_extensions $image_ext -}} {{- if eq ((index .Params.images 0) | printf "%.1s") "/" -}} - {{- $.Scratch.Set "image" (printf "..%s" (index .Params.images 0)) -}} + {{- $.Scratch.Set "image" (printf "%s" (index .Params.images 0)) -}} {{- else -}} {{- $.Scratch.Set "image" (printf "%s" (index .Params.images 0)) -}} {{- end -}} @@ -84,7 +84,7 @@ {{- $.Scratch.Set "relpermalink" (printf "%s" .Params.canonical) -}} {{- else -}} {{- $.Scratch.Set "permalink" .Permalink -}} - {{- $.Scratch.Set "relpermalink" (printf "..%s" .RelPermalink) -}} + {{- $.Scratch.Set "relpermalink" (printf "%s" .RelPermalink) -}} {{- end -}} {{- $.Scratch.Add "index" @@ -130,7 +130,7 @@ {{- $.Scratch.Set "relpermalink" (printf "%s" .Params.canonical) -}} {{- else -}} {{- $.Scratch.Set "permalink" .Permalink -}} - {{- $.Scratch.Set "relpermalink" (printf "../..%s" .RelPermalink) -}} + {{- $.Scratch.Set "relpermalink" (printf "%s" .RelPermalink) -}} {{- end -}} {{- $.Scratch.Set "id" (printf "builtin:rdk:component:%s:%s" (strings.Replace (strings.ToLower .Parent.LinkTitle) " " "_" ) (strings.ToLower .LinkTitle) ) -}} {{- $.Scratch.Set "api" (printf "rdk:component:%s" (strings.Replace (strings.ToLower .Parent.LinkTitle) " " "_" )) -}} @@ -169,7 +169,7 @@ {{- $.Scratch.Set "relpermalink" (printf "%s" .Params.canonical) -}} {{- else -}} {{- $.Scratch.Set "permalink" .Permalink -}} - {{- $.Scratch.Set "relpermalink" (printf "../../..%s" .RelPermalink) -}} + {{- $.Scratch.Set "relpermalink" (printf "%s" .RelPermalink) -}} {{- end -}} {{- $.Scratch.Set "id" (printf "builtin:rdk:service:%s:%s" (strings.Replace (strings.ToLower .Parent.LinkTitle) " " "_" ) (strings.ToLower .LinkTitle) ) -}}