Add schema.org/Dataset support to the JSON-LD @graph - #21084
Add schema.org/Dataset support to the JSON-LD @graph#21084workprentice[bot] wants to merge 1 commit into
Conversation
Adds a dataset-entity.html collector, following the existing itemlist-entity.html opt-in pattern: a page opts in with a "dataset" object in frontmatter (name, description, license, datePublished, keywords, variableMeasured, temporalCoverage, isAccessibleForFree, distribution), and the collector returns an empty dict (a no-op) for every page that hasn't opted in. Wires into graph-builder.html the same way itemlist and the comparison table do: collected before the WebPage entity is finalized so hasPart can point at it, then appended to the graph under its own @id. creator defaults to the shared Pulumi Organization @id already defined on every page, with an optional creator_name override for data attributed to a named person or team. This is prep for the State of IaC 2026 survey report, an upcoming page publishing original survey statistics: Dataset markup is what makes that data machine-extractable for search and AI systems, distinct from the Article/FAQPage markup a page like that would otherwise fall back to.
Pre-merge Review — Last updated 2026-08-24T12:40:56ZTip Summary: This PR adds a Review confidence:
Investigation log
🔍 Verification trail4 claims extracted · 1 verified · 0 unverifiable · 0 contradicted
🚨 Outstanding in this PRThese must be resolved or refuted before merging.
|
CamSoper
left a comment
There was a problem hiding this comment.
@workprentice please work through the findings on this
What
Adds
schema.org/Datasetsupport to the site-wide JSON-LD@graph, following the same opt-in collector pattern already used forItemListandFAQPage.A page opts in with a
datasetobject in frontmatter:Every field beyond
nameis optional; the collector only emits what a page actually declares, and returns an empty dict (a no-op) for every page that hasn't opted in — no existing page's markup changes.creatordefaults to the shared Pulumi Organization@idalready defined on every page, with an optionalcreator_nameoverride for data attributed to a named person or team.Why
None of the site's existing structured-data types (
WebSite,BreadcrumbList,SoftwareSourceCode,HowTo,FAQPage,TechArticle/APIReference,ItemList) tell search engines or AI systems "this page publishes a dataset." Pulumi's upcoming State of IaC 2026 survey report is exactly that kind of page — original survey data, not just narrative content — and without this, it would render with onlyArticle/FAQPagemarkup, which describes the write-up but not the underlying data.Datasetis the schema.org type built for exactly this case, and gives search/AI systems machine-readable access to license, coverage, variables measured, and the actual data files.Implementation
layouts/partials/schema/collectors/dataset-entity.html, mirroringitemlist-entity.html's structure and gating.layouts/partials/schema/graph-builder.htmlimmediately before theItemListblock, withhasPartset on the page'sWebPagenode and theDatasetnode appended to the@graphunder its own@id.Verification
Hugo template changes to
layouts/partials/schema/don't get meaningfully checked byhugo buildalone against this repo's asset pipeline in a sandboxed environment, so I verified with an isolated Hugo harness: a minimal site that copieslayouts/partials/schema/(plus its actual dependencies) verbatim, renders a page with a fulldatasetfrontmatter block, a page with a minimal one (name+creator_nameonly), and a control page with nodatasetfrontmatter at all, then parses every emittedld+jsonblock with a JSON parser. Results:DatasetJSON-LD with the right@idresolution andhasPartwiring, and only emit the optional fields actually supplied.@graphis unchanged — noDatasetnode appears, and every previously-existing node type on that page still renders.CI will additionally validate the template compiles across the full site.
🧠 This PR was created by workprentice.