From 6e6b52c2851438c305fd1cbd5b6ffd3266d284c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Wed, 18 Nov 2026 21:24:48 +0100 Subject: [PATCH 1/2] Build speaker and schedule JSON-LD from Sessionize The schedule and speakers JSON-LD was generated from data/*.yml, which still held the template's placeholder talks and speakers, so search engines were fed invented sessions a few days before the event. - Add partials/sessionize-data.html: fetch the Sessionize JSON "All data" endpoint (params.sessionizeApiUrl) at build time; a Sessionize outage logs a warning and omits the structured data - /schedule/ and /grid/: one EducationalEvent per accepted session (exact start/end, room, performers, superEvent), built with dict + jsonify - /speakers/: ItemList of Person (tagline, bio, photo, sameAs, performerIn) - Homepage Event: list all speakers as performer - Remove data/speakers.yml, sessions.yml, schedule.yml and the unused keynotes.html / speaker-card.html partials that depended on them - Fix event times: Dublin is on GMT (+00:00) in November, not +01:00; end time aligned with the last session (19:05) - Footer: show the short commit SHA (substr instead of slice, which rendered "[ 0 7]") - Homepage: drop the stale "CFP closed" badge (it also left an unclosed ) - Venue page title: "Venue" instead of "Venue: Confirmed" - Update CLAUDE.md and docs/STRUCTURED-DATA.md --- CLAUDE.md | 113 ++++-------- content/venue/_index.md | 2 +- data/schedule.yml | 53 ------ data/sessions.yml | 74 -------- data/speakers.yml | 62 ------- docs/STRUCTURED-DATA.md | 3 + hugo.toml | 5 +- layouts/index.html | 6 +- layouts/partials/footer.html | 2 +- layouts/partials/keynotes.html | 30 ---- layouts/partials/sessionize-data.html | 92 ++++++++++ layouts/partials/speaker-card.html | 30 ---- .../partials/structured-data-schedule.html | 168 +++++------------- .../partials/structured-data-speakers.html | 133 ++++---------- layouts/partials/structured-data.html | 8 + 15 files changed, 215 insertions(+), 566 deletions(-) delete mode 100644 data/schedule.yml delete mode 100644 data/sessions.yml delete mode 100644 data/speakers.yml delete mode 100644 layouts/partials/keynotes.html create mode 100644 layouts/partials/sessionize-data.html delete mode 100644 layouts/partials/speaker-card.html diff --git a/CLAUDE.md b/CLAUDE.md index b4a5373..d1eb79d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -51,22 +51,15 @@ This project uses Hugo's **native Tailwind CSS processing** without PostCSS or N ### Data-Driven Content Model -Conference content is stored in **YAML data files** (`data/*.yml`), not Markdown frontmatter: +Conference content is stored in **YAML data files** (`data/*.yml`), not Markdown frontmatter. Two kinds of content come from external services instead, fetched at build time with `resources.GetRemote`: -**`data/speakers.yml`** -- Speaker profiles: id, name, title, company, bio, photo, keynote flag, social links -- Accessed: `.Site.Data.speakers` -- Keynotes: `where .Site.Data.speakers "keynote" true` +**Sessions and speakers: Sessionize** +- Source of truth: Sessionize. Pages embed the Sessionize widgets (`/schedule/`, `/grid/`, `/speakers/`) +- `params.sessionizeApiUrl` points to the JSON "All data" endpoint +- `layouts/partials/sessionize-data.html` normalises it (sessions with Europe/Dublin RFC 3339 times, room, speaker ids; speakers with tagline, bio, photo, links). Use with `partialCached` +- There is no `data/speakers.yml` / `data/sessions.yml` / `data/schedule.yml` any more: edit the programme in Sessionize and redeploy -**`data/sessions.yml`** -- Talk details: id, title, description, speaker_ids (array), type, duration, track -- Types: keynote, talk, break, lightning, ceremony -- Linked to speakers via `speaker_ids` - -**`data/schedule.yml`** -- Multi-day, multi-track schedule grid -- Structure: `days[].slots[]` with time, type, session_ids, tracks, duration -- References sessions by ID +**Ticket prices: Tito** (see `layouts/partials/tito-data.html`) **`data/sponsors.yml`** - Sponsor tiers: Platinum, Gold, Silver, Community @@ -95,19 +88,17 @@ The site implements **comprehensive JSON-LD schemas** across three layers: - WebSite schema: Site metadata - BreadcrumbList schema: Navigation hierarchy for interior pages -**Layer 2: Speakers (`layouts/partials/structured-data-speakers.html`)** -- ItemList schema: All speakers with position indexing -- Person schemas: Individual speaker profiles with `performerIn` property -- Bidirectional linking: Speaker → talks, talks → speakers -- Dedicated schemas for keynote speakers with expertise tags +**Layer 2: Speakers (`layouts/partials/structured-data-speakers.html`)**, built from Sessionize +- ItemList of Person nodes (name, tagline as `jobTitle`, bio, photo, `sameAs` links) +- `performerIn` links each speaker to their sessions + +**Layer 3: Schedule (`layouts/partials/structured-data-schedule.html`)**, built from Sessionize, on `/schedule/` and `/grid/` +- One EducationalEvent per accepted session in an `@graph`: exact `startDate`/`endDate`, room as `location` (`containedInPlace` the venue), `performer` references, `superEvent` → main event +- The homepage Event also lists all speakers as `performer` -**Layer 3: Schedule (`layouts/partials/structured-data-schedule.html`)** -- EducationalEvent schema: Each talk/keynote with precise timing -- EventSeries schema: Full conference schedule -- `superEvent` hierarchy: Links sessions to main event -- ISO 8601 dates/durations (e.g., `PT30M` for 30 minutes) +**Key Pattern:** Use `@id` for cross-references: speakers are `{{ site.BaseURL }}speakers/#`, sessions `{{ site.BaseURL }}schedule/#session-`. Build JSON-LD objects with `dict` + `jsonify | safeJS` rather than string templating, so titles and bios are escaped correctly. -**Key Pattern:** Use `@id` for cross-references (e.g., `{{ .Site.BaseURL }}speakers/#{{ $speaker.id }}`). This enables Google Knowledge Graph integration. +**Time zone:** Dublin is on GMT (`+00:00`) in November, IST (`+01:00`) in summer. `eventStartDate`/`eventEndDate` in `hugo.toml` must carry the right offset. **Documentation:** See `docs/STRUCTURED-DATA.md` for complete schema details and validation instructions. @@ -140,15 +131,14 @@ The site implements **comprehensive JSON-LD schemas** across three layers: - `layouts/partials/tickets.html` — Tito ticket widget. The `js.tito.io` script is loaded from `head.html` on the homepage only (not site-wide). Tito's script resets the scroll position on `popstate`, so same-page anchor links are handled in `nav.html` with `pushState` - `layouts/partials/tito-data.html` — Fetches ticket names, prices and sale state from Tito at build time (use with `partialCached`) - `layouts/partials/stats.html` — Animated statistics counters -- `layouts/partials/keynotes.html` — Featured keynote speakers -- `layouts/partials/speaker-card.html` — Reusable speaker card component +- `layouts/partials/sessionize-data.html` — Fetches sessions and speakers from Sessionize at build time (use with `partialCached`) - `layouts/partials/discover-dublin.html` — "Discover Dublin" section with gallery, top things to do, and transport info - `layouts/partials/cta-newsletter.html` — Newsletter signup with social links (not active — no newsletter service configured yet) - `layouts/partials/css.html` — Deferred CSS rendering with Tailwind processing **Homepage composition (`layouts/index.html`):** -Active: Hero → About → Stats → Venue → Discover Dublin -Commented out (pending content): Keynotes, Sponsors, Tickets, Newsletter CTA +Active: Hero → key facts bar (date, venue, ticket prices) → About → Sponsors → Venue → Key questions → Tickets (Tito widget) → Discover Dublin +Commented out (pending content): Stats, Newsletter CTA ### Configuration (`hugo.toml`) @@ -199,48 +189,9 @@ text-heading: #f1f5f9 ## Content Management -### Adding Speakers - -Edit `data/speakers.yml`: -```yaml -- id: "speaker-slug" - name: "Full Name" - title: "Job Title" - company: "Company Name" - bio: "Biography text" - photo: "/img/speakers/photo.jpg" # or placeholder.svg - keynote: true # or false - social: - twitter: "https://twitter.com/handle" - github: "https://github.com/username" - linkedin: "https://linkedin.com/in/username" -``` - -Structured data will auto-generate for new speakers. - -### Adding Sessions/Talks - -Edit `data/sessions.yml`: -```yaml -- id: "talk-slug" - title: "Talk Title" - description: "Detailed description" - speaker_ids: ["speaker-slug"] # Array, can have multiple - type: "talk" # or "keynote", "lightning", "workshop" - duration: 30 # minutes - track: "track-1" # or "main" for plenary -``` - -Then add to schedule in `data/schedule.yml`: -```yaml -- time: "14:00" - type: "session" - session_ids: ["talk-slug"] - tracks: ["track-1"] - duration: 30 -``` +### Adding Speakers and Sessions -EducationalEvent schemas will auto-generate with correct dates/times. +Speakers, sessions, rooms and times are managed in **Sessionize**. After a change there, trigger a new deploy so the JSON-LD (built from `params.sessionizeApiUrl`) picks it up; the embedded widgets update on their own. ### Adding Blog Posts @@ -291,24 +242,20 @@ Commit message style: ### Accessing Data Files in Templates ```go -{{ range .Site.Data.speakers }} - {{ .name }} — {{ .company }} -{{ end }} - -{{ $keynotes := where .Site.Data.speakers "keynote" true }} - -{{ range where .Site.Data.sessions "type" "talk" }} - {{ .title }} +{{ range hugo.Data.sponsors.tiers }} + {{ .name }} {{ end }} ``` -### Linking Sessions to Speakers +### Sessions and Speakers from Sessionize ```go -{{ range .speaker_ids }} - {{ $speakerId := . }} - {{ range where $.Site.Data.speakers "id" $speakerId }} -

{{ .name }}

+{{ $sz := partialCached "sessionize-data.html" . }} +{{ if $sz.ok }} + {{ range $sz.sessions }} +

{{ .start }} {{ .title }}: + {{ range $i, $id := .speakers }}{{ if $i }}, {{ end }}{{ index $sz.speakerNames $id }}{{ end }} +

{{ end }} {{ end }} ``` diff --git a/content/venue/_index.md b/content/venue/_index.md index e3a2d77..9254180 100644 --- a/content/venue/_index.md +++ b/content/venue/_index.md @@ -1,4 +1,4 @@ --- -title: "Venue: Confirmed" +title: "Venue" description: "PyCon Ireland 2026 will take place on 21 November at Chartered Accountants House, on Dublin's Pearse St." --- diff --git a/data/schedule.yml b/data/schedule.yml deleted file mode 100644 index cd1b8d1..0000000 --- a/data/schedule.yml +++ /dev/null @@ -1,53 +0,0 @@ -days: - - name: "Saturday, 21 November 2026" - date: "2026-11-21" - slots: - - time: "09:00" - type: "break" - title: "Registration & Coffee" - duration: 60 - - - time: "10:00" - type: "session" - session_ids: ["keynote-1"] - tracks: ["main"] - duration: 45 - - - time: "10:45" - type: "break" - title: "Coffee Break" - duration: 30 - - - time: "11:15" - type: "session" - session_ids: ["talk-1", "talk-2"] - tracks: ["track-1", "track-2"] - duration: 30 - - - time: "11:45" - type: "session" - session_ids: ["talk-3", "talk-4"] - tracks: ["track-1", "track-2"] - duration: 30 - - - time: "12:15" - type: "break" - title: "Lunch" - duration: 60 - - - time: "13:15" - type: "session" - session_ids: ["lightning"] - tracks: ["main"] - duration: 60 - - - time: "14:15" - type: "break" - title: "Afternoon Break" - duration: 30 - - - time: "17:00" - type: "session" - session_ids: ["closing"] - tracks: ["main"] - duration: 30 diff --git a/data/sessions.yml b/data/sessions.yml deleted file mode 100644 index c2012cd..0000000 --- a/data/sessions.yml +++ /dev/null @@ -1,74 +0,0 @@ -- id: "keynote-1" - title: "The Future of Python: What's Coming in 3.15 and Beyond" - description: "An overview of the most exciting features coming to Python, from performance improvements to new syntax features. We'll explore the PEP process and how the community shapes the language." - speaker_ids: ["anna-ravenscroft"] - type: "keynote" - duration: 45 - track: "main" - -- id: "keynote-2" - title: "Scaling ML Pipelines: Lessons from Production" - description: "Real-world lessons from deploying machine learning models at scale. We'll cover data pipeline architecture, model serving, monitoring, and the tools that make it all work." - speaker_ids: ["james-murphy"] - type: "keynote" - duration: 45 - track: "main" - -- id: "talk-1" - title: "Cloud-Native Python: Containers, Kubernetes, and Beyond" - description: "Learn how to build and deploy Python applications in cloud-native environments. We'll cover containerization best practices, Kubernetes patterns, and serverless options." - speaker_ids: ["siobhan-oconnor"] - type: "talk" - duration: 30 - track: "track-1" - -- id: "talk-2" - title: "Building Real-Time Data Pipelines with Python" - description: "A deep dive into building real-time data processing pipelines using Python. We'll explore Apache Kafka, Apache Flink, and how to handle streaming data at scale." - speaker_ids: ["tomas-petricek"] - type: "talk" - duration: 30 - track: "track-2" - -- id: "talk-3" - title: "Python Security: Common Vulnerabilities and How to Avoid Them" - description: "An in-depth look at the most common security vulnerabilities in Python applications and practical strategies to prevent them." - speaker_ids: ["maria-garcia"] - type: "talk" - duration: 30 - track: "track-1" - -- id: "talk-4" - title: "Infrastructure as Code with Python and Pulumi" - description: "Discover how to manage cloud infrastructure using Python with Pulumi. We'll build real infrastructure and explore testing strategies for IaC." - speaker_ids: ["declan-kelly"] - type: "talk" - duration: 30 - track: "track-2" - -- id: "break-morning" - title: "Coffee Break" - type: "break" - duration: 30 - -- id: "lunch" - title: "Lunch" - type: "break" - duration: 60 - -- id: "break-afternoon" - title: "Afternoon Break" - type: "break" - duration: 30 - -- id: "lightning" - title: "Lightning Talks" - type: "lightning" - duration: 60 - track: "main" - -- id: "closing" - title: "Closing Remarks & Community Awards" - type: "ceremony" - duration: 30 - track: "main" diff --git a/data/speakers.yml b/data/speakers.yml deleted file mode 100644 index 16869db..0000000 --- a/data/speakers.yml +++ /dev/null @@ -1,62 +0,0 @@ -- id: "anna-ravenscroft" - name: "Anna Ravenscroft" - title: "Senior Software Engineer" - company: "Python Software Foundation" - bio: "Anna is a long-time Python core contributor and advocate for diversity in tech. She brings deep expertise in Python internals and community building." - photo: "/img/speakers/placeholder.svg" - keynote: true - social: - twitter: "https://twitter.com/example" - github: "https://github.com/example" - -- id: "james-murphy" - name: "James Murphy" - title: "ML Engineering Lead" - company: "Acme AI" - bio: "James specializes in deploying machine learning models at scale. He has contributed to several popular open-source ML libraries." - photo: "/img/speakers/placeholder.svg" - keynote: true - social: - twitter: "https://twitter.com/example" - github: "https://github.com/example" - -- id: "siobhan-oconnor" - name: "Siobhan O'Connor" - title: "Platform Architect" - company: "CloudScale" - bio: "Siobhan is passionate about cloud-native Python applications and has helped scale platforms serving millions of users." - photo: "/img/speakers/placeholder.svg" - keynote: false - social: - github: "https://github.com/example" - -- id: "tomas-petricek" - name: "Tomas Petricek" - title: "Data Engineer" - company: "DataFlow Systems" - bio: "Tomas focuses on data pipeline architecture and real-time processing. He is an active contributor to the Apache Airflow project." - photo: "/img/speakers/placeholder.svg" - keynote: false - social: - twitter: "https://twitter.com/example" - -- id: "maria-garcia" - name: "Maria Garcia" - title: "Security Researcher" - company: "SecurePy Labs" - bio: "Maria researches Python security patterns and helps organizations build secure applications. She is a regular speaker at security conferences." - photo: "/img/speakers/placeholder.svg" - keynote: false - social: - github: "https://github.com/example" - -- id: "declan-kelly" - name: "Declan Kelly" - title: "DevOps Engineer" - company: "InfraOps" - bio: "Declan automates everything with Python. From CI/CD pipelines to infrastructure-as-code, he believes in making operations effortless." - photo: "/img/speakers/placeholder.svg" - keynote: false - social: - twitter: "https://twitter.com/example" - github: "https://github.com/example" diff --git a/docs/STRUCTURED-DATA.md b/docs/STRUCTURED-DATA.md index 554c386..ffa74a2 100644 --- a/docs/STRUCTURED-DATA.md +++ b/docs/STRUCTURED-DATA.md @@ -1,5 +1,8 @@ # Structured Data (JSON-LD) - Implementation Guide +> **Update (November 2026):** the speaker and schedule schemas are now generated from the Sessionize JSON endpoint (`params.sessionizeApiUrl`, see `layouts/partials/sessionize-data.html`). `data/speakers.yml`, `data/sessions.yml` and `data/schedule.yml` were removed, and the `EventSeries` block was dropped. Sections below that refer to those files or to `+01:00` offsets describe the former setup; `CLAUDE.md` is the up-to-date reference. + + ## 📋 Vue d'Ensemble Le site PyCon Ireland 2026 implémente des schémas JSON-LD complets pour améliorer le référencement et activer les rich snippets dans les résultats de recherche Google. diff --git a/hugo.toml b/hugo.toml index 43f318c..00cb90c 100644 --- a/hugo.toml +++ b/hugo.toml @@ -29,8 +29,8 @@ enableGitInfo = true eventDate = "2026-11-21" # Event dates in ISO 8601 format (for structured data) - eventStartDate = "2026-11-21T09:00:00+01:00" - eventEndDate = "2026-11-21T18:00:00+01:00" + eventStartDate = "2026-11-21T09:00:00+00:00" # Dublin is on GMT (UTC+0) in November + eventEndDate = "2026-11-21T19:05:00+00:00" # End of the last session (Lightning Talks) in Sessionize # Venue information venue = "Chartered Accountants House" @@ -56,6 +56,7 @@ enableGitInfo = true cfpUrl = "https://sessionize.com/pycon-ireland-2026/" cfpOpens = "2026-05-25" cfpCloses = "2026-08-30" + sessionizeApiUrl = "https://sessionize.com/api/v2/k10qao8b/view/All" # JSON "All data" endpoint; sessions/speakers JSON-LD is built from it at build time ticketsUrl = "https://ti.to/python-ireland/pycon-ireland-2026" # Tito event URL; ticket names, prices and availability are fetched from Tito at build time ticketsValidFrom = "2026-10-01" # Date pricing tiers were announced; required by Google's Offer.validFrom check diff --git a/layouts/index.html b/layouts/index.html index 10d659e..62868cc 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -15,10 +15,7 @@ Submit a talk
{{ else if eq .Site.Params.cfpStatus "finished" }} - - - CFP closed {{ dateFormat "2 January 2006" .Site.Params.cfpCloses }} · - + {{- /* CFP finished: nothing to show, the tickets price line takes over */}} {{ else if eq .Site.Params.cfpStatus "closed" }} @@ -41,7 +38,6 @@ {{- partial "about.html" . -}} {{- /* partial "stats.html" . */ -}} - {{- /* partial "keynotes.html" . */ -}} {{- partial "sponsors-home.html" . -}} {{- partial "venue-home.html" . -}} {{- partial "key-questions.html" . -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 32ef4d2..fe8e75c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -66,7 +66,7 @@

Hugo & Tailwind CSS

{{ with os.Getenv "COMMIT_REF" }}

- {{ now.Format "2006-01-02" }} · {{ slice . 0 7 }} + {{ now.Format "2006-01-02" }} · {{ substr . 0 7 }}

{{ end }} diff --git a/layouts/partials/keynotes.html b/layouts/partials/keynotes.html deleted file mode 100644 index eab8ef2..0000000 --- a/layouts/partials/keynotes.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
-
-

Keynote Speakers

-

- Hear from leading voices in the Python community. -

-
- -
- {{ range where .Site.Data.speakers "keynote" true }} -
-
- {{ .name }} -
- Keynote -

{{ .name }}

-

{{ .title }}, {{ .company }}

-

{{ .bio }}

-
- {{ end }} -
- - -
-
diff --git a/layouts/partials/sessionize-data.html b/layouts/partials/sessionize-data.html new file mode 100644 index 0000000..2012aab --- /dev/null +++ b/layouts/partials/sessionize-data.html @@ -0,0 +1,92 @@ +{{- /* + Programme data fetched from Sessionize at build time. + + Sessionize is the single source of truth for sessions and speakers. The + JSON endpoint (site.Params.sessionizeApiUrl, "All data" view) is queried + once per build: use with partialCached. + + Returns a dict: + ok bool false if the URL is unset or Sessionize is unreachable + sessions slice dicts sorted by start time: + id, title, description, start, end (RFC 3339 with the + Europe/Dublin offset), room, type ("Talk"/"Workshop"), + speakers (slice of speaker ids) + speakers slice dicts sorted by name: + id, name, tagline, bio, photo, links (slice of URLs), + sessions (slice of session ids) + speakerNames dict speaker id -> full name + + A Sessionize outage must not break the build: on error a warning is logged + and callers omit the structured data. +*/ -}} +{{- $result := dict "ok" false -}} +{{- with site.Params.sessionizeApiUrl -}} + {{- $api := . -}} + {{- $remote := try (resources.GetRemote $api) -}} + {{- with $remote.Err -}} + {{- warnf "sessionize-data: cannot fetch %s: %s" $api . -}} + {{- else with $remote.Value -}} + {{- $data := . | transform.Unmarshal -}} + + {{- /* Lookup tables */ -}} + {{- $rooms := dict -}} + {{- range $data.rooms }}{{ $rooms = merge $rooms (dict (string .id) .name) }}{{ end -}} + {{- $categoryItems := dict -}} + {{- range $data.categories -}} + {{- if eq .title "Presentation Type" -}} + {{- range .items }}{{ $categoryItems = merge $categoryItems (dict (string .id) .name) }}{{ end -}} + {{- end -}} + {{- end -}} + + {{- /* Sessionize times are the event's wall-clock time; attach the + Europe/Dublin offset (GMT in winter, IST in summer). */ -}} + {{- $tz := "Europe/Dublin" -}} + {{- $rfc3339 := "2006-01-02T15:04:05-07:00" -}} + + {{- $sessions := slice -}} + {{- range sort $data.sessions "startsAt" -}} + {{- if and .startsAt (eq .status "Accepted") (not .isServiceSession) -}} + {{- $type := "" -}} + {{- range .categoryItems }}{{ with index $categoryItems (string .) }}{{ $type = . }}{{ end }}{{ end -}} + {{- $sessions = $sessions | append (dict + "id" (string .id) + "title" .title + "description" (.description | default "") + "start" ((time.AsTime (strings.TrimSuffix "Z" .startsAt) $tz).Format $rfc3339) + "end" ((time.AsTime (strings.TrimSuffix "Z" .endsAt) $tz).Format $rfc3339) + "room" (index $rooms (string .roomId) | default "") + "type" $type + "speakers" .speakers + ) -}} + {{- end -}} + {{- end -}} + + {{- $speakers := slice -}} + {{- $speakerNames := dict -}} + {{- range sort $data.speakers "fullName" -}} + {{- $links := slice -}} + {{- range .links }}{{ with .url }}{{ $links = $links | append . }}{{ end }}{{ end -}} + {{- $sessionIds := slice -}} + {{- range .sessions }}{{ $sessionIds = $sessionIds | append (string .) }}{{ end -}} + {{- $speakers = $speakers | append (dict + "id" .id + "name" .fullName + "tagline" (strings.TrimSpace (.tagLine | default "")) + "bio" (.bio | default "") + "photo" (.profilePicture | default "") + "links" $links + "sessions" $sessionIds + ) -}} + {{- $speakerNames = merge $speakerNames (dict .id .fullName) -}} + {{- end -}} + + {{- if $sessions -}} + {{- $result = dict "ok" true "sessions" $sessions "speakers" $speakers "speakerNames" $speakerNames -}} + {{- else -}} + {{- warnf "sessionize-data: no sessions returned by %s" $api -}} + {{- end -}} + {{- else -}} + {{- warnf "sessionize-data: %s not found (check params.sessionizeApiUrl)" $api -}} + {{- end -}} +{{- end -}} +{{- return $result -}} diff --git a/layouts/partials/speaker-card.html b/layouts/partials/speaker-card.html deleted file mode 100644 index 4a622cd..0000000 --- a/layouts/partials/speaker-card.html +++ /dev/null @@ -1,30 +0,0 @@ -{{ $speaker := .speaker }} -{{ $featured := .featured }} -
-
- {{ $speaker.name }} -
- - {{ if $speaker.keynote }} - Keynote - {{ end }} - -

{{ $speaker.name }}

-

{{ $speaker.title }}{{ with $speaker.company }}, {{ . }}{{ end }}

-

{{ $speaker.bio }}

- - {{ with $speaker.social }} -
- {{ with .twitter }} - - - - {{ end }} - {{ with .github }} - - - - {{ end }} -
- {{ end }} -
diff --git a/layouts/partials/structured-data-schedule.html b/layouts/partials/structured-data-schedule.html index 03e723a..7b1f596 100644 --- a/layouts/partials/structured-data-schedule.html +++ b/layouts/partials/structured-data-schedule.html @@ -1,127 +1,45 @@ -{{/* Option 3: EducationalEvent Schema for Each Talk/Keynote */}} - -{{/* Extract year and month from event start date */}} -{{ $eventStart := time.AsTime $.Site.Params.eventStartDate }} -{{ $year := $eventStart.Format "2006" }} -{{ $month := $eventStart.Format "01" }} - -{{ range $day := .Site.Data.schedule.days }} - {{ range $slot := $day.slots }} - {{ if eq $slot.type "session" }} - {{ range $sessionId := $slot.session_ids }} - {{ range $session := where $.Site.Data.sessions "id" $sessionId }} - {{ if or (eq $session.type "keynote") (eq $session.type "talk") }} +{{- /* + JSON-LD for the schedule pages (/schedule/, /grid/): one EducationalEvent + per accepted Sessionize session, linked to the main event (superEvent), + the venue (containedInPlace) and its speakers (performer, @id references + to the Person nodes emitted on /speakers/). +*/ -}} +{{- $sz := partialCached "sessionize-data.html" . -}} +{{- if $sz.ok }} +{{- $base := site.BaseURL -}} +{{- $graph := slice -}} +{{- range $sz.sessions -}} + {{- $performers := slice -}} + {{- range .speakers -}} + {{- $performers = $performers | append (dict + "@type" "Person" + "@id" (printf "%sspeakers/#%s" $base .) + "name" (index $sz.speakerNames .) + ) -}} + {{- end -}} + {{- $location := dict + "@type" "Place" + "name" (cond (ne .room "") (printf "%s, %s" .room site.Params.venue) site.Params.venue) + "containedInPlace" (dict "@id" (printf "%svenue/#place" $base)) + -}} + {{- $event := dict + "@type" "EducationalEvent" + "@id" (printf "%sschedule/#session-%s" $base .id) + "name" .title + "startDate" .start + "endDate" .end + "eventStatus" "https://schema.org/EventScheduled" + "eventAttendanceMode" "https://schema.org/OfflineEventAttendanceMode" + "location" $location + "superEvent" (dict "@id" (printf "%s#main-event" $base)) + "organizer" (dict "@id" (printf "%s#organization" site.Params.organizerUrl)) + "inLanguage" "en" + -}} + {{- with .description }}{{ $event = merge $event (dict "description" .) }}{{ end -}} + {{- with $performers }}{{ $event = merge $event (dict "performer" .) }}{{ end -}} + {{- $graph = $graph | append $event -}} +{{- end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} - {{ end }} -{{ end }} - -{{/* EventSeries for the full conference schedule */}} - +{{- end }} diff --git a/layouts/partials/structured-data-speakers.html b/layouts/partials/structured-data-speakers.html index 64a5030..c259e42 100644 --- a/layouts/partials/structured-data-speakers.html +++ b/layouts/partials/structured-data-speakers.html @@ -1,102 +1,35 @@ -{{/* ItemList + Person Schema for Speakers Page */}} - -{{/* Option 1: ItemList showing all speakers */}} +{{- /* + JSON-LD for /speakers/: an ItemList of Person nodes built from Sessionize. + Each Person has a stable @id (speakers/#) referenced by the + sessions on /schedule/ and by the main Event's performer list, and links + back to its sessions via performerIn. +*/ -}} +{{- $sz := partialCached "sessionize-data.html" . -}} +{{- if $sz.ok }} +{{- $base := site.BaseURL -}} +{{- $items := slice -}} +{{- range $i, $s := $sz.speakers -}} + {{- $person := dict + "@type" "Person" + "@id" (printf "%sspeakers/#%s" $base $s.id) + "name" $s.name + -}} + {{- with $s.tagline }}{{ $person = merge $person (dict "jobTitle" .) }}{{ end -}} + {{- with $s.bio }}{{ $person = merge $person (dict "description" .) }}{{ end -}} + {{- with $s.photo }}{{ $person = merge $person (dict "image" .) }}{{ end -}} + {{- with $s.links }}{{ $person = merge $person (dict "sameAs" .) }}{{ end -}} + {{- $performerIn := slice -}} + {{- range $s.sessions }}{{ $performerIn = $performerIn | append (dict "@id" (printf "%sschedule/#session-%s" $base .)) }}{{ end -}} + {{- with $performerIn }}{{ $person = merge $person (dict "performerIn" .) }}{{ end -}} + {{- $items = $items | append (dict "@type" "ListItem" "position" (add $i 1) "item" $person) -}} +{{- end }} - -{{/* Individual Person schemas with rich detail for keynote speakers */}} -{{ range $speaker := where .Site.Data.speakers "keynote" true }} - -{{ end }} +{{- end }} diff --git a/layouts/partials/structured-data.html b/layouts/partials/structured-data.html index 7d37634..9c17b04 100644 --- a/layouts/partials/structured-data.html +++ b/layouts/partials/structured-data.html @@ -66,6 +66,14 @@ "@type": "Organization", "@id": "{{ .Site.Params.organizerUrl }}#organization" } + {{- $sz := partialCached "sessionize-data.html" . }} + {{- if $sz.ok }} + {{- $performers := slice }} + {{- range $sz.speakers }} + {{- $performers = $performers | append (dict "@type" "Person" "@id" (printf "%sspeakers/#%s" site.BaseURL .id) "name" .name) }} + {{- end }}, + "performer": {{ $performers | jsonify | safeJS }} + {{- end }} {{- $tito := partialCached "tito-data.html" . }} {{- if $tito.ok }} {{- $offers := slice }} From 268da0cf83ee79def5fc140baa368b1c0abbbd9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Wirtel?= Date: Wed, 18 Nov 2026 21:29:29 +0100 Subject: [PATCH 2/2] Fix session JSON-LD type and add recommended Event fields - Use schema.org EducationEvent: "EducationalEvent" (inherited from the previous partial) is not a schema.org type, so every session node and its properties were invalid - Add the venue address to each session location (required by Google for physical events) - Add image (speaker photos, site image as fallback) and offers (the conference tickets from Tito) to each session - Expose speakerPhotos from sessionize-data.html --- CLAUDE.md | 2 +- layouts/partials/sessionize-data.html | 6 +++- .../partials/structured-data-schedule.html | 36 +++++++++++++++++-- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index d1eb79d..47e06e5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -93,7 +93,7 @@ The site implements **comprehensive JSON-LD schemas** across three layers: - `performerIn` links each speaker to their sessions **Layer 3: Schedule (`layouts/partials/structured-data-schedule.html`)**, built from Sessionize, on `/schedule/` and `/grid/` -- One EducationalEvent per accepted session in an `@graph`: exact `startDate`/`endDate`, room as `location` (`containedInPlace` the venue), `performer` references, `superEvent` → main event +- One EducationEvent (schema.org has no "EducationalEvent") per accepted session in an `@graph`: exact `startDate`/`endDate`, room as `location` (venue `address`, `containedInPlace` the venue), `performer` references, `superEvent` → main event - The homepage Event also lists all speakers as `performer` **Key Pattern:** Use `@id` for cross-references: speakers are `{{ site.BaseURL }}speakers/#`, sessions `{{ site.BaseURL }}schedule/#session-`. Build JSON-LD objects with `dict` + `jsonify | safeJS` rather than string templating, so titles and bios are escaped correctly. diff --git a/layouts/partials/sessionize-data.html b/layouts/partials/sessionize-data.html index 2012aab..d5c076d 100644 --- a/layouts/partials/sessionize-data.html +++ b/layouts/partials/sessionize-data.html @@ -15,6 +15,7 @@ id, name, tagline, bio, photo, links (slice of URLs), sessions (slice of session ids) speakerNames dict speaker id -> full name + speakerPhotos dict speaker id -> photo URL (only speakers with a photo) A Sessionize outage must not break the build: on error a warning is logged and callers omit the structured data. @@ -63,6 +64,7 @@ {{- $speakers := slice -}} {{- $speakerNames := dict -}} + {{- $speakerPhotos := dict -}} {{- range sort $data.speakers "fullName" -}} {{- $links := slice -}} {{- range .links }}{{ with .url }}{{ $links = $links | append . }}{{ end }}{{ end -}} @@ -78,10 +80,12 @@ "sessions" $sessionIds ) -}} {{- $speakerNames = merge $speakerNames (dict .id .fullName) -}} + {{- $speakerId := .id -}} + {{- with .profilePicture }}{{ $speakerPhotos = merge $speakerPhotos (dict $speakerId .) }}{{ end -}} {{- end -}} {{- if $sessions -}} - {{- $result = dict "ok" true "sessions" $sessions "speakers" $speakers "speakerNames" $speakerNames -}} + {{- $result = dict "ok" true "sessions" $sessions "speakers" $speakers "speakerNames" $speakerNames "speakerPhotos" $speakerPhotos -}} {{- else -}} {{- warnf "sessionize-data: no sessions returned by %s" $api -}} {{- end -}} diff --git a/layouts/partials/structured-data-schedule.html b/layouts/partials/structured-data-schedule.html index 7b1f596..b67dca9 100644 --- a/layouts/partials/structured-data-schedule.html +++ b/layouts/partials/structured-data-schedule.html @@ -1,5 +1,5 @@ {{- /* - JSON-LD for the schedule pages (/schedule/, /grid/): one EducationalEvent + JSON-LD for the schedule pages (/schedule/, /grid/): one EducationEvent per accepted Sessionize session, linked to the main event (superEvent), the venue (containedInPlace) and its speakers (performer, @id references to the Person nodes emitted on /speakers/). @@ -7,23 +7,53 @@ {{- $sz := partialCached "sessionize-data.html" . -}} {{- if $sz.ok }} {{- $base := site.BaseURL -}} +{{- /* Google requires location.address on physical events */ -}} +{{- $address := dict + "@type" "PostalAddress" + "streetAddress" site.Params.venueStreetAddress + "addressLocality" site.Params.venueCity + "postalCode" site.Params.venuePostalCode + "addressRegion" site.Params.venueRegion + "addressCountry" site.Params.venueCountry +-}} +{{- /* Admission to every session is the conference ticket: reuse Tito's offers */ -}} +{{- $offers := slice -}} +{{- $tito := partialCached "tito-data.html" . -}} +{{- if $tito.ok -}} + {{- range $tito.releases -}} + {{- $offer := dict + "@type" "Offer" + "name" .name + "price" (printf "%.2f" .price) + "priceCurrency" $tito.currency + "url" site.Params.ticketsUrl + "validFrom" site.Params.ticketsValidFrom + -}} + {{- with .availability }}{{ $offer = merge $offer (dict "availability" .) }}{{ end -}} + {{- $offers = $offers | append $offer -}} + {{- end -}} +{{- end -}} +{{- $fallbackImage := site.Params.ogImage | absURL -}} {{- $graph := slice -}} {{- range $sz.sessions -}} {{- $performers := slice -}} + {{- $images := slice -}} {{- range .speakers -}} {{- $performers = $performers | append (dict "@type" "Person" "@id" (printf "%sspeakers/#%s" $base .) "name" (index $sz.speakerNames .) ) -}} + {{- with index $sz.speakerPhotos . }}{{ $images = $images | append . }}{{ end -}} {{- end -}} {{- $location := dict "@type" "Place" "name" (cond (ne .room "") (printf "%s, %s" .room site.Params.venue) site.Params.venue) + "address" $address "containedInPlace" (dict "@id" (printf "%svenue/#place" $base)) -}} {{- $event := dict - "@type" "EducationalEvent" + "@type" "EducationEvent" "@id" (printf "%sschedule/#session-%s" $base .id) "name" .title "startDate" .start @@ -34,7 +64,9 @@ "superEvent" (dict "@id" (printf "%s#main-event" $base)) "organizer" (dict "@id" (printf "%s#organization" site.Params.organizerUrl)) "inLanguage" "en" + "image" (cond (gt (len $images) 0) $images (slice $fallbackImage)) -}} + {{- with $offers }}{{ $event = merge $event (dict "offers" .) }}{{ end -}} {{- with .description }}{{ $event = merge $event (dict "description" .) }}{{ end -}} {{- with $performers }}{{ $event = merge $event (dict "performer" .) }}{{ end -}} {{- $graph = $graph | append $event -}}