Files
valknar b3b9fb7ac6 Initial commit — Bar Pivoine cocktail recipe site
Hugo Extended site with 426 cocktail recipes from the open cocktail dataset.
Dark amber/gold editorial aesthetic, Tailwind CSS v4, Alpine.js client-side
search and filtering, HTMX page transitions, Docker + nginx production build.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-07 11:53:45 +02:00

43 lines
1.6 KiB
HTML

{{- if .IsHome -}}
{{- $schema := dict
"@context" "https://schema.org"
"@type" "WebSite"
"name" .Site.Title
"url" .Site.BaseURL
"description" .Site.Params.description
"publisher" (dict "@type" "Organization" "name" .Site.Title "url" .Site.BaseURL)
"potentialAction" (dict
"@type" "SearchAction"
"target" (dict "@type" "EntryPoint" "urlTemplate" (print .Site.BaseURL "recipes/?q={search_term_string}"))
"query-input" "required name=search_term_string"
)
-}}
{{- printf "<script type=\"application/ld+json\">%s</script>" ($schema | jsonify) | safeHTML -}}
{{- else if and .IsPage (eq .Section "recipes") -}}
{{- $img := "" -}}
{{- with .Resources.GetMatch "cocktail.*" -}}
{{- $img = (.Resize "800x webp").Permalink | absURL -}}
{{- else -}}
{{- $img = .Params.drinkThumbnail | default (.Site.Params.ogImage | absURL) -}}
{{- end -}}
{{- $category := "" -}}
{{- with .Params.categories -}}{{- $category = index . 0 -}}{{- end -}}
{{- $description := .Description | default .Site.Params.description -}}
{{- $schema := dict
"@context" "https://schema.org"
"@type" "Recipe"
"name" .Title
"description" $description
"url" .Permalink
"image" $img
"author" (dict "@type" "Organization" "name" .Site.Title)
"recipeCategory" $category
"recipeIngredient" (.Params.ingredients | default (slice))
"recipeInstructions" (slice (dict "@type" "HowToStep" "text" (.Content | plainify | strings.TrimSpace)))
-}}
{{- printf "<script type=\"application/ld+json\">%s</script>" ($schema | jsonify) | safeHTML -}}
{{- end -}}