Skip to content

Commit

Permalink
Fix typesense duplication ingestion (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Mar 11, 2024
1 parent c10714f commit c1a83b7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/tutorials/projects/helmet.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ linkTitle: "Helmet Monitor"
type: "docs"
description: "Get a text or email if people are not wearing hard hats, and track data over time."
videos: ["/tutorials/helmet/hardhat.webm", "/tutorials/helmet/hardhat.mp4"]
# images: ["/tutorials/helmet/hardhat-data.png"]
images: ["/tutorials/helmet/hardhat.gif"]
videoAlt: "A man without a hard hat is detected and labeled as No-Hardhat. Then he puts on a hard hat and a bounding box labeled Hardhat appears. He gives a thumbs-up to the camera."
tags: ["tutorial"]
authors: [Jessamy Taylor]
Expand Down
24 changes: 12 additions & 12 deletions layouts/_default/list.typesense.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,25 +45,25 @@
{{- end -}}

{{- end -}}
{{- $.Scratch.Set "image" "" -}}
{{- else -}}
{{- $.Scratch.Set "webm" "" -}}
{{- $.Scratch.Set "mp4" "" -}}
{{- end -}}

{{- if (index .Params.images 0) -}}
{{- $image_ext := path.Ext (index .Params.images 0) -}}
{{- $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)) -}}
{{- if (index .Params.images 0) -}}
{{- $image_ext := path.Ext (index .Params.images 0) -}}
{{- $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)) -}}
{{- else -}}
{{- $.Scratch.Set "image" (printf "%s" (index .Params.images 0)) -}}
{{- end -}}
{{- else -}}
{{- $.Scratch.Set "image" (printf "%s" (index .Params.images 0)) -}}
{{- $.Scratch.Set "image" "" -}}
{{- end -}}
{{- else -}}
{{- $.Scratch.Set "image" "" -}}
{{- end -}}
{{- else -}}
{{- $.Scratch.Set "image" "" -}}
{{- end -}}
{{- end -}}

{{- if .Params.canonical -}}
Expand Down
Binary file added static/tutorials/helmet/hardhat.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c1a83b7

Please sign in to comment.