Add JSON-LD structured data design spec#14
Merged
Merged
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #14 +/- ##
============================================
+ Coverage 92.22% 93.56% +1.33%
- Complexity 118 153 +35
============================================
Files 1 1
Lines 283 373 +90
============================================
+ Hits 261 349 +88
- Misses 22 24 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Add setBreadcrumbs() method to set breadcrumb JSON-LD structured data - Add getBreadcrumbs() method to retrieve rendered JSON-LD output - Update renderJsonLd() to output compact JSON without pretty-print - Fix test setUp with fallbacks() for generic route URL reversal - Add fullBaseUrl configuration for full URL generation in tests - Add HTTP_HOST to test request for proper host-aware URL building - All 5 breadcrumb tests pass, PHPStan analysis clean
The test was comparing relative URLs but assertions were using fullBase. Updated assertions to not use fullBase to match getCanonical() behavior which doesn't use the full parameter by default.
e4af0e4 to
8ff8cb8
Compare
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.
Summary
Add JSON-LD structured data support to MetaHelper for Schema.org markup generation.
Features
setBreadcrumbs()/getBreadcrumbs()setArticle()/getArticle()setOrganization()/getOrganization()with global config merge supportAPI
Changes
$_jsonLdstorage property andrenderJsonLd()helperout()method