TigerSEO: JSON-LD site-identity graph (Organization + WebSite + SiteNavigation)#13
Merged
Conversation
…avigation) The rich-results / sitelinks layer. Where Seo_Service_Head describes one page, the new Seo_Service_Schema describes the SITE as an entity — a single ld+json @graph: - Organization — brand name, logo (media row → real absolute URL + dimensions), sameAs social links. Config: tiger.site.name / tiger.site.logo / tiger.seo.social.*. - WebSite — publisher → Organization; optional SearchAction (sitelinks searchbox) when tiger.seo.schema.search_url is configured. - SiteNavigationElement — the primary menu (Tiger_Menu::getData), so Google can map site structure into nav sitelinks. Emitted once per request (the service latches) by Seo_Plugin_Head into a process-wide 'tigerJsonLd' Zend_View placeholder that the public layout renders — same contributed-head seam as the OG tags, no core edit, degrades to nothing without the module. Fail-soft throughout; < and > are hex-escaped via JSON_HEX_TAG so no value can break out of the <script>. Smoke asserts the seeded page carries a valid Organization ld+json block. BreadcrumbList + Article are the next slice. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
The rich-results / sitelinks layer — the JSON-LD that Phase 3's sitelinks discussion was aiming at. Where
Seo_Service_Headdescribes one page (title/OG/canonical), the newSeo_Service_Schemadescribes the site as an entity.One
@graph, three nodesA single
<script type="application/ld+json">block, cross-referenced by@id:name,logo(resolved through themediarow → a real absolute URL + truewidth/height), and socialsameAslinks. This is the entity a knowledge panel / brand sitelinks attach to.publisher→ the Organization; an optionalSearchAction(the Google sitelinks searchbox) emitted only whentiger.seo.schema.search_urlis configured.Tiger_Menu::getData), top-level items, so Google can map site structure into nav sitelinks.Same seam as the OG tags
Seo_Plugin_HeadcallsSeo_Service_Schema::emitSite()once per request (the service latches — the site graph is identical on every page). It appends into a process-widetigerJsonLdZend_Viewplaceholder that the public layout renders — no core edit, and it's gone when the module is uninstalled (non-public layouts just don't output the placeholder). Not aTiger_Service_Service, so unreachable over/api.Config-driven + safe
Everything reads the config cascade (
tiger.site.name/.logo,tiger.seo.social.*,tiger.seo.schema.*) — org-scoped, live-override. Fail-soft: a missing name/logo/menu just omits that node; a broken lookup never breaks the page.</>are hex-escaped (JSON_HEX_TAG) so no field value can break out of the<script>(verified: a<script>in a value serializes to<script>, still valid JSON).Verified
Smoke now asserts the seeded page carries an
application/ld+jsonblock with theOrganizationnode and that the block parses as valid JSON.Next slice: BreadcrumbList (per-page trail) + Article (blog rich result), which build on the same graph.
🤖 Generated with Claude Code