Fix Event and datetime issues from the Search Console structured data report - #384
Open
gregswinehart wants to merge 1 commit into
Open
Fix Event and datetime issues from the Search Console structured data report#384gregswinehart wants to merge 1 commit into
gregswinehart wants to merge 1 commit into
Conversation
Search Console flagged four non-critical Events issues on the posit.co domain property. Two of them (eventStatus, organizer) originate here; the other two (offers, performer) come from posit.co proper. - Emit eventStatus: EventScheduled on all Event objects. No event has a cancelled/postponed field, so all are genuinely scheduled. - Add opt-in `organizer` front matter. Most events on this site are run by third parties (SDSS is the ASA's, PyCon US is the PSF's), so defaulting the organizer to Posit would assert something false. Set it only on posit::conf(2025) and posit::conf(2026). Also fixes a separate datetime defect found while validating: VideoObject uploadDate was emitted date-only, which Google rejects as an invalid datetime missing a timezone, across all 1,684 video pages. The cheatsheet LearningResource datePublished had the same format bug. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for posit-open-source canceled.
|
Contributor
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this responds to
Search Console emailed us "Events structured data issues detected in posit.co" listing four non-critical issues:
eventStatusorganizeroffersperformerThat alert is for the
posit.codomain property, which covers subdomains — so it poolsposit.coandopensource.posit.cotogether. Before writing any code I checked which site each issue actually comes from, by pulling the live Event JSON-LD from both:eventStatusorganizeroffersperformerposit.co(Drupal, 40 event pages sampled)opensource.posit.co(this repo, 43 events)So
eventStatusandorganizerare ours —posit.cosets both on every page I sampled, meaning those two lines in the email can only be coming from this site.offersandperformerwere already being reported fromposit.cobefore this site emitted any Event markup at all; #364 added 43 more pages to those two counts but didn't introduce them.This PR clears the two issues that originate on
opensource.posit.co.How it fixes them
eventStatus— fixed for all 43 eventslayouts/partials/jsonld.htmlnow emits"eventStatus": "https://schema.org/EventScheduled"on every Event. Unconditional is the right call: no event has a cancelled or postponed field in its front matter, so all 43 are genuinely scheduled. If we ever need to mark one cancelled, it becomes a front matter lookup at that point.organizer— fixed for the 2 events we actually organizeThis one deserves an explanation, because the obvious fix is the wrong one.
The tempting move is to set
organizerto Posit Software, PBC everywhere and watch the warning count go to zero. But most events on this site are other people's events — we list them because Posit folks are speaking or teaching there. SDSS is the American Statistical Association's. PyCon US is the Python Software Foundation's. useR! is the R Foundation's. Declaring Posit as the organizer of all of them would be false structured data, which is a worse outcome than an unfilled optional field — Google treats misleading markup as a quality problem, not a neutral one.So
organizeris opt-in via front matter:Set here on
posit::conf(2025)andposit::conf(2026), which we unambiguously run. The other 41 events are left without it deliberately.offersandperformer— not addressed, deliberatelyoffersneeds real ticket pricing we don't have and mostly can't speak to for third-party events.performerisn't a meaningful concept for a conference. Both are optional. These two are also the pair thatposit.coaccounts for, so the counts in Search Console won't reach zero from this repo regardless.Also fixed: an invalid datetime Google was rejecting
While validating the above against Google's Rich Results Test, the video pages turned up a real error the email didn't mention:
VideoObject.uploadDatewas being emitted date-only (2024-10-31) instead of full ISO 8601. That affected all 1,684 video pages. Now2024-10-31T00:00:00+00:00, matching the formatBlogPostingalready used. The cheatsheetLearningResource.datePublishedhad the identical bug — Google doesn't flag it becauseLearningResourceisn't a rich-result type, but it's fixed too.Event
startDate/endDatestay date-only; Google accepts that for Events and raised no warning on them.Verification
Full local rebuild, all JSON-LD extracted and parsed:
eventStatusorganizeruploadDatedatePublishedI also rebuilt with these changes stashed to confirm the diff is otherwise neutral — identical page counts and identical output for every other type.
What to expect after deploy
Search Console reports lag behind recrawl, so the counts won't move immediately. Once Google recrawls, the
eventStatusline should drop off entirely andorganizershould fall by two.offersandperformerwill remain, driven mostly byposit.co. All four are non-critical throughout — nothing here was keeping pages out of search.Known gaps, not fixed here
Turned up during validation, all content rather than template problems:
imageauthordescription— these nine won't be eligible for video rich results until described🤖 Generated with Claude Code