diff --git a/qdrant-landing/assets/schema/event-schema.json b/qdrant-landing/assets/schema/event-schema.json new file mode 100644 index 000000000..84aeb7449 --- /dev/null +++ b/qdrant-landing/assets/schema/event-schema.json @@ -0,0 +1,51 @@ +{ + "@type": "Event", + "@id": "{{- with .Params.link -}}{{- . -}}{{- else -}}{{- .Permalink -}}{{- end -}}#event", + "name": "{{- with .Params.event_name -}}{{- . | htmlEscape -}}{{- else -}}{{- .Title | htmlEscape -}}{{- end -}}", + "description": {{ $description := printf "%s" (.Params.description | plainify | replaceRE "(\n)" "" | replaceRE "[^\\w\\s:\\[\\]{}\"]" "" | htmlEscape ) -}}"{{- $description -}}", + {{- $image := "" -}} + {{- with .Params.social_preview_image -}}{{- $image = . | absURL -}}{{- end -}} + {{- if and (not $image) .Params.preview_image -}}{{- $image = .Params.preview_image | absURL -}}{{- end -}} + {{- if $image }} + "image": ["{{- $image -}}"], + {{- end }} + "url": "{{- with .Params.link -}}{{- . -}}{{- else -}}{{- .Permalink -}}{{- end -}}", + "startDate": "{{- .Params.start -}}"{{- with .Params.end -}}, + "endDate": "{{- . -}}"{{- end -}}, + "eventStatus": "{{- with .Params.eventStatus -}}{{- . -}}{{- else -}}https://schema.org/EventScheduled{{- end -}}", + {{- $attendanceMode := "https://schema.org/OfflineEventAttendanceMode" -}} + {{- if eq (lower (printf "%s" .Params.place)) "online" -}} + {{- $attendanceMode = "https://schema.org/OnlineEventAttendanceMode" -}} + {{- end -}} + {{- with .Params.eventAttendanceMode -}}{{- $attendanceMode = . -}}{{- end }} + "eventAttendanceMode": "{{- $attendanceMode -}}", + {{- if .Params.location }} + "location": { + "@type": "Place", + "name": "{{- .Params.location.name | htmlEscape -}}"{{- with .Params.location.streetAddress -}}, + "address": { + "@type": "PostalAddress", + "streetAddress": "{{- . | htmlEscape -}}", + "addressLocality": "{{- $.Params.location.addressLocality | htmlEscape -}}", + "addressRegion": "{{- $.Params.location.addressRegion | htmlEscape -}}", + "postalCode": "{{- $.Params.location.postalCode | htmlEscape -}}", + "addressCountry": "{{- $.Params.location.addressCountry | htmlEscape -}}" + }{{- end -}} + }, + {{- else if eq (lower (printf "%s" .Params.place)) "online" }} + "location": { + "@type": "VirtualLocation"{{- with .Params.link -}}, + "url": "{{- . -}}"{{- end -}} + }, + {{- else if .Params.place }} + "location": { + "@type": "Place", + "name": "{{- .Params.place | htmlEscape -}}" + }, + {{- end }} + "organizer": { + "@type": "Organization", + "name": "Qdrant", + "url": "https://qdrant.tech" + } +} diff --git a/qdrant-landing/assets/schema/organization-schema.json b/qdrant-landing/assets/schema/organization-schema.json index aa332167c..87b6cb3e8 100644 --- a/qdrant-landing/assets/schema/organization-schema.json +++ b/qdrant-landing/assets/schema/organization-schema.json @@ -12,7 +12,7 @@ "founders": [ { "@type": "Person", - "name": "{{ .Site.Params.Author }}" + "name": "Andrey Vasnetsov" }, { "@type": "Person", "name": "Andre Zayarni" diff --git a/qdrant-landing/content/vsd-recap/_index.md b/qdrant-landing/content/vsd-recap/_index.md index 4407267a9..949f4a4d1 100644 --- a/qdrant-landing/content/vsd-recap/_index.md +++ b/qdrant-landing/content/vsd-recap/_index.md @@ -3,6 +3,19 @@ title: Vector Space Day SF 2026 Recap description: Watch session recordings, meet the speakers, and relive Vector Space Day 2026 in San Francisco. url: /vector-space-day-sf-26-recap/ social_preview_image: /vsd/vsd-link-preview.jpg +event_name: Vector Space Day SF 2026 +start: "2026-06-11T08:30:00-07:00" +end: "2026-06-11T18:00:00-07:00" +location: + name: The Midway + streetAddress: 900 Marin St + addressLocality: San Francisco + addressRegion: CA + postalCode: "94124" + addressCountry: US +seo_schema_json: + - schema/organization-schema.json + - schema/event-schema.json build: render: always cascade: diff --git a/qdrant-landing/themes/qdrant-2024/layouts/partials/seo_schema.html b/qdrant-landing/themes/qdrant-2024/layouts/partials/seo_schema.html index 9c796df8a..cf831ae29 100644 --- a/qdrant-landing/themes/qdrant-2024/layouts/partials/seo_schema.html +++ b/qdrant-landing/themes/qdrant-2024/layouts/partials/seo_schema.html @@ -15,23 +15,16 @@ {{ end }} {{ if .Params.seo_schema_json }} - + + {{- $context := . -}} + {{- range $index, $element := .Params.seo_schema_json -}} + {{- $template := resources.Get $element -}} + {{- $schema := $template | resources.ExecuteAsTemplate (printf "schema%d.json" $index) $context -}} + {{- $data := merge (dict "@context" "https://schema.org") ($schema | unmarshal) -}} + {{- end -}} {{ else if .IsHome }} {{ $organizationTemplate := resources.Get "schema/organization-schema.json" }} {{ $organizationSchema := $organizationTemplate | resources.ExecuteAsTemplate "schema-organization-home.json" . }} @@ -47,6 +40,24 @@ ] } +{{ else if and (eq .Section "events") (not .IsPage) }} + {{ $organizationTemplate := resources.Get "schema/organization-schema.json" }} + {{ $organizationTarget := printf "schema-org-events-%s.json" (replaceRE "(\\s)" "" .Params.title) }} + {{ $organizationSchema := $organizationTemplate | resources.ExecuteAsTemplate $organizationTarget . }} + {{- $orgData := merge (dict "@context" "https://schema.org") ($organizationSchema | unmarshal) -}} + + {{- $eventTemplate := resources.Get "schema/event-schema.json" -}} + {{- range $index, $event := .Pages -}} + {{- if not $event.Params.start -}}{{- continue -}}{{- end -}} + {{- $target := printf "schema-event-%d-%s.json" $index (replaceRE "[^a-zA-Z0-9]+" "" $event.Title) -}} + {{- $schema := $eventTemplate | resources.ExecuteAsTemplate $target $event -}} + {{- $data := merge (dict "@context" "https://schema.org") ($schema | unmarshal) -}} + + {{- end -}} {{ else if or (in (slice "documentation" "benchmarks") .Section) (and (in (slice "blog" "articles") .Section) .IsPage) }} {{ $organizationTemplate := resources.Get "schema/organization-schema.json" }} {{ $organizationTarget := printf "schema-org-1-%s.json" (replaceRE "(\\s)" "" .Params.title) }} diff --git a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html index 8eaa00ebe..61a45e847 100644 --- a/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html +++ b/qdrant-landing/themes/qdrant/layouts/partials/seo_schema.html @@ -15,22 +15,15 @@ {{ end }} {{ if .Params.seo_schema_json }} + {{- $context := . -}} + {{- range $index, $element := .Params.seo_schema_json -}} + {{- $template := resources.Get $element -}} + {{- $schema := $template | resources.ExecuteAsTemplate (printf "schema%d.json" $index) $context -}} + {{- $data := merge (dict "@context" "https://schema.org") ($schema | unmarshal) -}} + {{- end -}} {{ else if .IsHome }} @@ -49,6 +42,25 @@ } +{{ else if and (eq .Section "events") (not .IsPage) }} + {{ $organizationTemplate := resources.Get "schema/organization-schema.json" }} + {{ $organizationTarget := printf "schema-org-events-%s.json" (replaceRE "(\\s)" "" .Params.title) }} + {{ $organizationSchema := $organizationTemplate | resources.ExecuteAsTemplate $organizationTarget . }} + {{- $orgData := merge (dict "@context" "https://schema.org") ($organizationSchema | unmarshal) -}} + + {{- $eventTemplate := resources.Get "schema/event-schema.json" -}} + {{- range $index, $event := .Pages -}} + {{- if not $event.Params.start -}}{{- continue -}}{{- end -}} + {{- $target := printf "schema-event-%d-%s.json" $index (replaceRE "[^a-zA-Z0-9]+" "" $event.Title) -}} + {{- $schema := $eventTemplate | resources.ExecuteAsTemplate $target $event -}} + {{- $data := merge (dict "@context" "https://schema.org") ($schema | unmarshal) -}} + + {{- end -}} + {{ else if or (in (slice "documentation" "benchmarks") .Section) (and (in (slice "blog" "articles") .Section) .IsPage) }} {{ $organizationTemplate := resources.Get "schema/organization-schema.json" }}