From 6b0a2f5610133923c4c69cda99584cf638135207 Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Mon, 15 Jun 2026 15:40:11 +0200 Subject: [PATCH] docs(seo-graph-core): clarify buildPiece takes no IdFactory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Piece builders section opened with "All builders take an input object and the IdFactory". That holds for the seven dedicated builders (buildWebSite, buildWebPage, buildArticle, buildBreadcrumbList, buildImageObject, buildVideoObject, buildSiteNavigationElement — all `(input, ids)`), but not for buildPiece, whose signature is single-arg `buildPiece(raw)`: the caller passes `@id`/`@type` inline. Call out the exception so readers don't pass a second argument that doesn't exist. --- packages/seo-graph-core/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/seo-graph-core/README.md b/packages/seo-graph-core/README.md index a552617..c777293 100644 --- a/packages/seo-graph-core/README.md +++ b/packages/seo-graph-core/README.md @@ -51,8 +51,10 @@ missing pieces during development. ### Piece builders -All builders take an input object and the `IdFactory`, and return a plain -object with `@type` and `@id`. Builders for CreativeWork subtypes (`WebSite`, +The dedicated builders take an input object and the `IdFactory`, and return a +plain object with `@type` and `@id`. `buildPiece` is the exception: it takes +only the input object — pass `@id` and `@type` inline in that object. Builders +for CreativeWork subtypes (`WebSite`, `WebPage`, `Article`) share a common set of optional fields via `CreativeWorkFields`: `description`, `inLanguage`, `datePublished`, `dateModified`, `about`, `copyrightHolder`, `copyrightYear`,