Repository navigation
feat: link docs pages to the Vaadin entity graph in JSON-LD - #6802
Conversation
Configure the structured data that Design System Publisher adds to each article page: the docs WebSite node, which is part of the main vaadin.com website and published by the Vaadin organization, and the product each page is about, by path. Pages under /flow are about Vaadin Flow, pages under /hilla about Hilla, and all other pages about the Vaadin platform. Also document the new structuredData option in the DSP configuration page. The option takes effect once the pinned DSP version includes it.
No article lives under /hilla any more, as all /hilla paths redirect to other sections, so the mapping never matched a page. Also document the canonicalUrl version property, which structured data depends on, and list structuredData in the default configuration.
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-6802.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 19fd64f |
| }, | ||
| "about": { | ||
| "/": "https://vaadin.com/#software", | ||
| "/flow": "https://vaadin.com/flow#software" |
There was a problem hiding this comment.
https://vaadin.com/flow#software doesn't seem to exist in the vaadin.com graph. https://vaadin.com/flow redirects (301) to https://vaadin.com/framework, and that page defines the Flow entity as https://vaadin.com/framework#software. As written, the pages under /flow would point at an @id that nothing defines. Should this be https://vaadin.com/framework#software?
There was a problem hiding this comment.
Yes, good catch. vaadin.com/flow redirects to vaadin.com/framework, and that page's JSON-LD defines https://vaadin.com/framework#software. Nothing defines https://vaadin.com/flow#software. I changed the /flow mapping to https://vaadin.com/framework#software and updated the PR description.
vaadin.com/flow redirects to vaadin.com/framework, which defines the Flow entity as https://vaadin.com/framework#software. Nothing defines https://vaadin.com/flow#software.
vaadin-review-bot
left a comment
There was a problem hiding this comment.
Reviewed the changes — left 1 comment and collected 1 finding below that could not be attached to the diff.
| Finding | |
|---|---|
| 💬 | The first two sentences of the Structured Data section contradict each other |
| The pending DSP version bump has to cover a second pin |
The PR description names only DSP_VERSION in dspublisher/dspublisher-scripts.js. The DSP version is pinned a second time here:
RUN DOCS_PREVIEW_DIFF=true DOCS_SITE_URL="$DOCS_SITE_URL" npx -y @vaadin/dspublisher@3.0.0-alpha.15 --build
If only dspublisher-scripts.js is bumped, the preview deployment keeps building with the old release, and the new structuredData option stays inert exactly where reviewers would look for it.
Dockerfile.preview:41 · accuracy
| [[structured-data]] | ||
| == Structured Data | ||
|
|
||
| Each article page has JSON-LD structured data in its `<head>`: the article, with its title, description, canonical URL and last modified date, and the breadcrumb trail of the page. It's added only to pages that have a canonical URL, which needs a `canonicalUrl` for the version and, if that's relative, the `siteUrl`. |
There was a problem hiding this comment.
💬 The first two sentences of the Structured Data section contradict each other
Each article page has JSON-LD structured data in its
<head>… It's added only to pages that have a canonical URL, which needs acanonicalUrlfor the version and, if that's relative, thesiteUrl.
Sentence one says every article page has the data; sentence two takes it back. The condition is also stacked into one clause, so the reader has to unpack two dependencies at once.
Suggested rewrite:
An article page gets JSON-LD structured data in its
<head>when the page has a canonical URL. The canonical URL comes from thecanonicalUrlof the version, and fromsiteUrlwhen that value is relative. The data contains:
- the article, with its title, description, canonical URL and last modified date
- the breadcrumb trail of the page
configuration.adoc:136 · clarity
There was a problem hiding this comment.
Rewrote the opening as suggested: the canonical URL condition comes first, then where the URL comes from, and the contents are now a bulleted list.
|
|
|
I checked the config against the live JSON-LD on vaadin.com, including the product entities added to the vaadin.com pages on 2026-11-30. Every Two suggestions: 1. The website "url": "https://vaadin.com/docs/latest/",The 2. More specific
"about": {
"/": "https://vaadin.com/#software",
"/flow": "https://vaadin.com/framework#software",
"/flow/react-views": "https://vaadin.com/hilla#software",
"/flow/testing": "https://vaadin.com/testbench#software",
"/components": "https://vaadin.com/components#software",
"/tools/copilot": "https://vaadin.com/copilot#software"
}Components and Copilot are clear-cut. The React views and testing lines are judgement calls, since both sections are under Flow. Control Center also has an entity ( One more thing to confirm: live docs pages already output |
That's correct, production is always built from |
Pages under /components, /tools/copilot, /flow/react-views and /flow/testing are now about the UI Components, Copilot, Hilla and TestBench entities that vaadin.com defines. The docs website URL points to /docs/latest/, since /docs/ redirects there.
|
@freducom Thanks, applied both suggestions.
@tomivirkki Thanks for confirming. The PR description now says that production picks this up on the first deploy after merge, and that the DSP version bump is only needed for local development and the PR preview. |
…CP: v25.3) (#6818) Co-authored-by: totally-not-ai[bot] <290682512+totally-not-ai[bot]@users.noreply.github.com>
Summary
Configures the JSON-LD structured data that Design System Publisher adds to each docs article, so that each page links to the Vaadin entity graph used on vaadin.com, and documents the new
structuredDataoption.Production builds from the
docs-appdefault branch, which already supports the option, so it takes effect on the first production deploy after this is merged. Local development and the PR preview use the pinned DSP release (DSP_VERSIONindspublisher/dspublisher-scripts.jsand the build inDockerfile.preview), and get the structured data once those are bumped to a release that includes it.What changed
dspublisher/config/default.json:WebSitenodehttps://vaadin.com/docs/#website, with URLhttps://vaadin.com/docs/latest/, part ofhttps://vaadin.com/#websiteand published byhttps://vaadin.com/#organization.aboutby path, the longest match wins:/components:https://vaadin.com/components#software/tools/copilot:https://vaadin.com/copilot#software/flow/react-views:https://vaadin.com/hilla#software/flow/testing:https://vaadin.com/testbench#software/flow:https://vaadin.com/framework#softwarehttps://vaadin.com/#softwarestructuredDataoption and section, thecanonicalUrlversion property that the data depends on, and a note thatdateModifiedneeds a full Git clone./hillamapping: every/hillapath is a redirect now, so no page would match it. The React views pages, where that content now lives, are about Hilla instead.Test summary
Working on behalf of Petter