Skip to content

Commit e5e34b7

Browse files
schema: make Organization node resolvable on Article/TechArticle pages (#20524)
BlogPosting, FAQPage, and TechArticle nodes emit publisher (and related fields) as a bare {"@id": "https://www.pulumi.com/#organization"} reference. That @id only resolves to concrete data (name, logo) when the same page's JSON-LD @graph also defines the Organization node — but only the homepage does. Structured-data parsers evaluate each URL's JSON-LD independently and do not dereference @id links across pages, so publisher.name (required by schema.org/Article) and publisher.logo (recommended for rich results) have been undefined on every blog post and docs page. This adds a minimal, resolvable Organization node (name, url, logo) to the @graph on every non-home page, with values copied verbatim from the homepage's node so the entity stays consistent site-wide. The homepage keeps its existing full corporate entity (founders, address, sameAs, etc.) unchanged and does not get a duplicate node. Verified via local Hugo build: publisher @id now resolves to a concrete Organization node with name + logo on both a blog post (/blog/infrastructure-as-code-tools/) and a docs page (/docs/iac/concepts/), while the homepage still emits exactly one Organization node. Co-authored-by: workprentice <257153108+workprentice@users.noreply.github.com>
1 parent 520c89b commit e5e34b7

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

layouts/partials/schema/graph-builder.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,34 @@
241241
"keywords" "infrastructure as code, IaC, cloud, DevOps, automation, platform engineering"
242242
}}
243243
{{ $graph = $graph | append $software }}
244+
{{ else }}
245+
{{/* Add a minimal, resolvable Organization node on every non-home page.
246+
article-entity.html (and other collectors) emit publisher/author/citation
247+
fields as a bare {"@id": "https://www.pulumi.com/#organization"} reference,
248+
which only resolves to concrete data (name, logo) if the *same page's*
249+
@graph also defines that @id. Google's structured-data parsers evaluate
250+
each URL's JSON-LD independently and do not dereference @id links across
251+
pages, so without this, publisher.name (required by schema.org/Article)
252+
and publisher.logo (recommended for rich results) are undefined on every
253+
blog post and docs page. Kept intentionally minimal (name/url/logo only,
254+
vs. the full corporate entity above) to avoid duplicating detailed
255+
metadata like founders/address/sameAs across thousands of pages; values
256+
are copied verbatim from the homepage's Organization node above so the
257+
entity stays consistent site-wide. */}}
258+
{{ $orgMinimal := dict
259+
"@type" (slice "Organization" "Corporation")
260+
"@id" "https://www.pulumi.com/#organization"
261+
"name" "Pulumi Corporation"
262+
"alternateName" "Pulumi"
263+
"url" "https://www.pulumi.com"
264+
"logo" (dict
265+
"@type" "ImageObject"
266+
"url" "https://www.pulumi.com/logos/brand/logo.png"
267+
"width" 600
268+
"height" 60
269+
)
270+
}}
271+
{{ $graph = $graph | append $orgMinimal }}
244272
{{ end }}
245273

246274
{{/* Add comparison table to graph (collected earlier to wire hasPart into WebPage) */}}

0 commit comments

Comments
 (0)