Skip to content

Commit

Permalink
All rich result's test sample outputs were verified by validated with…
Browse files Browse the repository at this point in the history
… Google's rich result test tool
  • Loading branch information
darsan-in committed Nov 21, 2024
1 parent 5053af7 commit 8191d39
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
5 changes: 4 additions & 1 deletion lib/serializers/breadcrumb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export default function serializeBreadCrumb(

return serializedJsonLD;
} else {
console.log("BreadCrumb not possible");
console.log(
"BreadCrumb not possible for ",
breadCrumbData.breadCrumbMetas[0].item,
);
return null;
}
}
2 changes: 1 addition & 1 deletion test/outputs/browser-env/carousels/recipies.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
RichieJS.default({ richieNames: ['productwv'] })
});
</script>
<script type="application/ld+json">[{"@context":"https://schema.org/","@type":"ProductGroup","name":"Denim Jacket","description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined","brand":{"@type":"Brand","name":"XYZ Brand"},"productGroupID":"45428345ff87be22344034c5abbfe662","variesBy":["color","suggestedAge","suggestedGender"],"hasVariant":[{"@context":"https://schema.org/","@type":"Product","name":"Denim Jacket","image":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","sku":"123456789","mpn":"ABC123","offers":{"@type":"Offer","category":"Fees","price":990,"priceCurrency":"INR","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined?var=black_20_male","priceValidUntil":"1970-01-31T00:00:00.000Z","availability":"InStock","itemCondition":"NewCondition","hasMerchantReturnPolicy":{"@id":"#return_policy"},"shippingDetails":{"@id":"#shipping_policy"}},"audience":{"@type":"PeopleAudience","suggestedGender":"MALE","suggestedAge":{"@type":"QuantitativeValue","minValue":20}},"color":"Black"},{"@context":"https://schema.org/","@type":"Product","name":"Denim Jacket","image":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","sku":"123456789","mpn":"ABC123","offers":{"@type":"Offer","category":"Fees","price":990,"priceCurrency":"INR","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined?var=brown_10_female","priceValidUntil":"1970-01-31T00:00:00.000Z","availability":"InStock","itemCondition":"NewCondition","hasMerchantReturnPolicy":{"@id":"#return_policy"},"shippingDetails":{"@id":"#shipping_policy"}},"audience":{"@type":"PeopleAudience","suggestedGender":"FEMALE","suggestedAge":{"@type":"QuantitativeValue","minValue":10}},"color":"Brown"}],"aggregateRating":{"@type":"AggregateRating","ratingValue":100,"bestRating":100,"ratingCount":2000},"review":[{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Person","name":"John"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Organization","name":"Foogle"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Person","name":"John"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Organization","name":"Foogle"}}]},{"@context":"https://schema.org/","@id":"#shipping_policy","@type":"OfferShippingDetails","shippingRate":{"@type":"MonetaryAmount","value":80,"currency":"INR"},"shippingDestination":{"@type":"DefinedRegion","addressCountry":"IN"},"deliveryTime":{"@type":"ShippingDeliveryTime","handlingTime":{"@type":"QuantitativeValue","minValue":1,"maxValue":3,"unitCode":"DAY"},"transitTime":{"@type":"QuantitativeValue","minValue":3,"maxValue":5,"unitCode":"DAY"}}},{"@context":"https://schema.org/","@id":"#return_policy","@type":"MerchantReturnPolicy","applicableCountry":"IN","returnPolicyCategory":"MerchantReturnFiniteReturnWindow","merchantReturnDays":30,"returnMethod":"ReturnByMail","returnFees":"FreeReturn"}]</script></head>
<script type="application/ld+json">[{"@context":"https://schema.org/","@type":"ProductGroup","name":"Denim Jacket","description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined","brand":{"@type":"Brand","name":"XYZ Brand"},"productGroupID":"1ed1e2648c45650546ffe1932bc7120c","variesBy":["color","suggestedAge","suggestedGender"],"hasVariant":[{"@context":"https://schema.org/","@type":"Product","name":"Denim Jacket","image":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","sku":"123456789","mpn":"ABC123","offers":{"@type":"Offer","category":"Fees","price":990,"priceCurrency":"INR","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined?var=black_20_male","priceValidUntil":"1970-01-31T00:00:00.000Z","availability":"InStock","itemCondition":"NewCondition","hasMerchantReturnPolicy":{"@id":"#return_policy"},"shippingDetails":{"@id":"#shipping_policy"}},"audience":{"@type":"PeopleAudience","suggestedGender":"MALE","suggestedAge":{"@type":"QuantitativeValue","minValue":20}},"color":"Black"},{"@context":"https://schema.org/","@type":"Product","name":"Denim Jacket","image":["https://example.com/image1.jpg","https://example.com/image2.jpg"],"description":"Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.","sku":"123456789","mpn":"ABC123","offers":{"@type":"Offer","category":"Fees","price":990,"priceCurrency":"INR","url":"https://www.cresteem.com//A:/Git/cresteem/Richie-JS/test/test-sample/productVarient/productCombined?var=brown_10_female","priceValidUntil":"1970-01-31T00:00:00.000Z","availability":"InStock","itemCondition":"NewCondition","hasMerchantReturnPolicy":{"@id":"#return_policy"},"shippingDetails":{"@id":"#shipping_policy"}},"audience":{"@type":"PeopleAudience","suggestedGender":"FEMALE","suggestedAge":{"@type":"QuantitativeValue","minValue":10}},"color":"Brown"}],"aggregateRating":{"@type":"AggregateRating","ratingValue":100,"bestRating":100,"ratingCount":2000},"review":[{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Person","name":"John"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Organization","name":"Foogle"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Person","name":"John"}},{"@type":"Review","reviewRating":{"@type":"Rating","ratingValue":4.5,"bestRating":5},"author":{"@type":"Organization","name":"Foogle"}}]},{"@context":"https://schema.org/","@id":"#shipping_policy","@type":"OfferShippingDetails","shippingRate":{"@type":"MonetaryAmount","value":80,"currency":"INR"},"shippingDestination":{"@type":"DefinedRegion","addressCountry":"IN"},"deliveryTime":{"@type":"ShippingDeliveryTime","handlingTime":{"@type":"QuantitativeValue","minValue":1,"maxValue":3,"unitCode":"DAY"},"transitTime":{"@type":"QuantitativeValue","minValue":3,"maxValue":5,"unitCode":"DAY"}}},{"@context":"https://schema.org/","@id":"#return_policy","@type":"MerchantReturnPolicy","applicableCountry":"IN","returnPolicyCategory":"MerchantReturnFiniteReturnWindow","merchantReturnDays":30,"returnMethod":"ReturnByMail","returnFees":"FreeReturn"}]</script></head>

<body>
<div class="product">
Expand Down
2 changes: 1 addition & 1 deletion test/outputs/browser-env/videos.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
RichieJS.default({ richieNames: ['video'] })
});
</script>
<script type="application/ld+json">[{"@context":"https://schema.org","@type":"VideoObject","name":"TERRIBLY Misunderstood! Full-Frame Blackmagic Cinema Camera 6K [Review w/ Footage] - YouTube","description":"My review of the new full-frame Blackmagic Cinema Camera 6K with lots of beautiful footage...⚡︎ Blackmagic Cinema Camera 6K 👉🏻 https://amzn.to/3uB3mBx⚡︎ Mo...","thumbnailUrl":"https://i.ytimg.com/vi/pI4TnpCMgP8/maxresdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=pI4TnpCMgP8","embedUrl":"https://www.youtube.com/embed/pI4TnpCMgP8?si=wPfEdco5EIZ9oaMW","uploadDate":"2023-11-24T09:00:41-08:00","duration":"PT11M44S","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"WatchAction"},"userInteractionCount":62486},"expires":"3023-11-24T22:30:41.000+05:30","hasPart":[{"@type":"Clip","name":"Photo Testing","startOffset":30,"endOffset":200,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=30s"},{"@type":"Clip","name":"Video Testing","startOffset":200,"endOffset":800,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=200s"},{"@type":"Clip","name":"Cinematic Testing","startOffset":800,"endOffset":805,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=800s"}]},{"@context":"https://schema.org","@type":"VideoObject","name":"Ben Affleck is The Batman - YouTube","description":"#benaffleck #batman #zacksnyder #zacksnydersjusticeleague #batmanvsuperman #henrycavill #anime #dceu #dcuniverse #dccomics #batmanarkhamknight","thumbnailUrl":"https://i.ytimg.com/vi/IHZDKOH624s/hqdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=IHZDKOH624s","embedUrl":"https://www.youtube.com/embed/IHZDKOH624s?si=tG9q9eY3lhT7fTQi","uploadDate":"2022-08-01T21:08:18-07:00","duration":"PT0M43S","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"WatchAction"},"userInteractionCount":658304},"expires":"3022-08-02T09:38:18.000+05:30","hasPart":[{"@type":"Clip","name":"Bruce Wayne Entry","startOffset":2,"endOffset":10,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=2s"},{"@type":"Clip","name":"Clark Messing Around","startOffset":10,"endOffset":30,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=10s"},{"@type":"Clip","name":"Batman Prep time","startOffset":30,"endOffset":35,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=30s"}]}]</script></head>
<script type="application/ld+json">[{"@context":"https://schema.org","@type":"VideoObject","name":"TERRIBLY Misunderstood! Full-Frame Blackmagic Cinema Camera 6K [Review w/ Footage] - YouTube","description":"My review of the new full-frame Blackmagic Cinema Camera 6K with lots of beautiful footage...⚡︎ Blackmagic Cinema Camera 6K 👉🏻 https://amzn.to/3uB3mBx⚡︎ Mo...","thumbnailUrl":"https://i.ytimg.com/vi/pI4TnpCMgP8/maxresdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=pI4TnpCMgP8","embedUrl":"https://www.youtube.com/embed/pI4TnpCMgP8?si=wPfEdco5EIZ9oaMW","uploadDate":"2023-11-24T09:00:41-08:00","duration":"PT11M44S","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"WatchAction"},"userInteractionCount":62501},"expires":"3023-11-24T22:30:41.000+05:30","hasPart":[{"@type":"Clip","name":"Photo Testing","startOffset":30,"endOffset":200,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=30s"},{"@type":"Clip","name":"Video Testing","startOffset":200,"endOffset":800,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=200s"},{"@type":"Clip","name":"Cinematic Testing","startOffset":800,"endOffset":805,"url":"https://www.youtube.com/watch?v=pI4TnpCMgP8&t=800s"}]},{"@context":"https://schema.org","@type":"VideoObject","name":"Ben Affleck is The Batman - YouTube","description":"#benaffleck #batman #zacksnyder #zacksnydersjusticeleague #batmanvsuperman #henrycavill #anime #dceu #dcuniverse #dccomics #batmanarkhamknight","thumbnailUrl":"https://i.ytimg.com/vi/IHZDKOH624s/hqdefault.jpg","contentUrl":"https://www.youtube.com/watch?v=IHZDKOH624s","embedUrl":"https://www.youtube.com/embed/IHZDKOH624s?si=tG9q9eY3lhT7fTQi","uploadDate":"2022-08-01T21:08:18-07:00","duration":"PT0M43S","interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"WatchAction"},"userInteractionCount":658338},"expires":"3022-08-02T09:38:18.000+05:30","hasPart":[{"@type":"Clip","name":"Bruce Wayne Entry","startOffset":2,"endOffset":10,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=2s"},{"@type":"Clip","name":"Clark Messing Around","startOffset":10,"endOffset":30,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=10s"},{"@type":"Clip","name":"Batman Prep time","startOffset":30,"endOffset":35,"url":"https://www.youtube.com/watch?v=IHZDKOH624s&t=30s"}]}]</script></head>

<body>

Expand Down
4 changes: 2 additions & 2 deletions test/outputs/node-env/Output_13_videos.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 62486
"userInteractionCount": 62501
},
"expires": "3023-11-24T22:30:41.000+05:30",
"hasPart": [
Expand Down Expand Up @@ -65,7 +65,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 658304
"userInteractionCount": 658338
},
"expires": "3022-08-02T09:38:18.000+05:30",
"hasPart": [
Expand Down
2 changes: 1 addition & 1 deletion test/outputs/node-env/Output_17_productCombined.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"description": "Product Description Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"url": "https://www.cresteem.com/test/test-sample/productVarient/productCombined",
"brand": { "@type": "Brand", "name": "XYZ Brand" },
"productGroupID": "197cef61d94f7a223ae6ef7b162449e8",
"productGroupID": "54048d6422bc08132892d12d7b11bb87",
"variesBy": ["color", "suggestedAge", "suggestedGender"],
"hasVariant": [
{
Expand Down
4 changes: 2 additions & 2 deletions test/outputs/node-env/Output_3_recipies.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 36085893
"userInteractionCount": 36087891
},
"expires": "3020-05-16T11:00:00.000+05:30"
}
Expand Down Expand Up @@ -174,7 +174,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 807674
"userInteractionCount": 807732
},
"expires": "3023-06-29T12:51:52.000+05:30"
}
Expand Down
4 changes: 2 additions & 2 deletions test/outputs/node-env/Output_4_recipies.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 36085893
"userInteractionCount": 36087891
},
"expires": "3020-05-16T11:00:00.000+05:30"
}
Expand Down Expand Up @@ -166,7 +166,7 @@
"interactionStatistic": {
"@type": "InteractionCounter",
"interactionType": { "@type": "WatchAction" },
"userInteractionCount": 807674
"userInteractionCount": 807732
},
"expires": "3023-06-29T12:51:52.000+05:30"
}
Expand Down

0 comments on commit 8191d39

Please sign in to comment.