Add schema.org JSON-LD structured data - #2759
Open
AutomatedTester wants to merge 1 commit into
Open
Conversation
Member
|
@AutomatedTester can you please check the conflicts? |
Docsy calls Hugo's _internal/schema.html, which emits only a handful of sparse microdata meta tags. Search engines and retrieval systems get no explicit signal about what kind of page they are looking at, who publishes it, or when it was last updated. Emits one JSON-LD block per page: - WebSite on the home page - TechArticle for documentation pages - BlogPosting for blog posts, with datePublished and author All three carry an Organization publisher and inLanguage, so the four language variants are described accurately. dateModified comes from .Lastmod, which is already backed by git commit dates via enableGitInfo, making freshness explicit rather than something a crawler has to guess. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AutomatedTester
force-pushed
the
structured-data
branch
from
August 11, 2026 08:31
ab9a54d to
b675dfc
Compare
✅ Deploy Preview for selenium-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Description
Adds schema.org JSON-LD to every page, in the same
head-end.htmlhook:WebSitedocumentation/**TechArticleblog/**BlogPostingAll three share one
Organizationpublisher carrying the Selenium logo and theproject's
sameAsprofiles (GitHub, LinkedIn, X, YouTube).inLanguageis setper page, so the translations describe themselves correctly rather than claiming
to be English.
dateModifiedcomes from.Lastmod; blog posts also getdatePublishedand, where the front matter has one, anauthor.descriptionandauthorare merged in conditionally, so pages missing thatfront matter emit valid JSON-LD without empty keys rather than
"author": "".Like the canonical link, this is skipped for the
printoutput format.Motivation and Context
Docsy calls Hugo's
_internal/schema.html, which produces only sparse microdata —not enough for search engines or AI crawlers to tell that a page is technical
reference documentation, which project publishes it, or when it was last updated.
TechArticlein particular is the signal that distinguishes our docs from blogcommentary about Selenium, which matters when both are competing for the same
query.
This pairs with the
llms.txtindex in #2757: that one states which pagesare canonical, this one describes what each page actually is.
Types of changes
Checklist
Built locally against Hugo Extended 0.148.2 (the version CI pins), on this branch
in isolation. Verified in the rendered output by parsing every emitted
<script type="application/ld+json">block with a JSON parser rather thaneyeballing it:
WebSite,inLanguage: en/documentation/webdriver/TechArticle,inLanguage: en,dateModified/ja/documentation/webdriver/TechArticle,inLanguage: jaBlogPosting,datePublished+dateModified_print/pagesld+jsonblocks, exactly one canonicalNo empty-string values on any page, and the publisher carries the logo plus all 4
sameAsprofiles. On the print pages the single canonical is Docsy's own(
<link rel="canonical" type="text/html" href=".../documentation/">) — pointingback at the HTML page, as intended — confirming this hook correctly emits nothing
there.
Rebased onto
trunkafter #2758 merged, so this now contains only the JSON-LDchange (+51/-1). The rebase was clean: #2757 and #2758 were squash-merged, so this
branch's former parent was no longer an ancestor of
trunkand GitHub reported aconflict — but trunk's
head-end.htmlis byte-identical to what #2758 merged, soit was a history-shape artifact rather than a content disagreement.
The build above is against current
trunk, which matters because #2757 addedllmsas an alternative output format on the home page, and this hook derivesthe current format by subtracting alternatives. Verified those coexist: the home
page still emits exactly one canonical and one
ld+jsonblock, and/llms.txtisstill generated with its 119 links.
🤖 Generated with Claude Code