From 5561685a7ae72870a1d7b2eb8a5587c40c7143cb Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:44:05 +0530 Subject: [PATCH 01/18] wip --- src/structured-data/schema.js | 44 +++++++++++++++++++++ src/structured-data/structured-data-tags.js | 10 ++--- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git a/src/structured-data/schema.js b/src/structured-data/schema.js index f02597ff..bfd059e1 100644 --- a/src/structured-data/schema.js +++ b/src/structured-data/schema.js @@ -151,3 +151,47 @@ export function generateAuthorPageSchema(publisherConfig, data, url) { }, }; } + +export function generateRecipePageSchema(publisherConfig, data, url, story) { + const sketchesHost = publisherConfig["sketches-host"]; + const publisherName = getTitle(publisherConfig); + const authorHREF = url["href"]; + const authorURL = `${sketchesHost}${authorHREF}`; + const authorName = get(data, ["author", "name"], ""); + // console.log("generateRecipePageSchema --->", { publisherConfig, data, url, story }); + return { + "@context": "https://schema.org/", + "@type": "Recipe", + name: story.headline, + url: story.url, + author: { + "@type": "Person", + name: story["author-name"], + }, + image: { "@type": "ImageObject", url: story.recipeUrl }, + description: story.description, + recipeIngredient: ["1 cup sugar", "2 cups flour", "1 cup chocolate chips"], + recipeInstructions: [ + { + "@type": "HowToStep", + text: "Preheat the oven to 350 degrees F.", + }, + { + "@type": "HowToStep", + text: "Mix the sugar and flour.", + }, + { + "@type": "HowToStep", + text: "Add the chocolate chips and bake for 10 minutes.", + }, + ], + recipeYield: "24 cookies", + prepTime: "PT20M", + cookTime: "PT10M", + totalTime: "PT30M", + nutrition: { + "@type": "NutritionInformation", + calories: "200 calories", + }, + }; +} diff --git a/src/structured-data/structured-data-tags.js b/src/structured-data/structured-data-tags.js index 755e046d..5a6843ee 100644 --- a/src/structured-data/structured-data-tags.js +++ b/src/structured-data/structured-data-tags.js @@ -265,11 +265,11 @@ function generateLiveBlogPostingData(structuredData = {}, story = {}, publisherC function getEmbedUrl(cards) { const playerUrlMapping = { "dailymotion-embed-script": "dailymotion-url", - "instagram": "instagram-url", + instagram: "instagram-url", "facebook-video": "facebook-url", - "tweet": "tweet-url", + tweet: "tweet-url", "vimeo-video": "vimeo-url", - "brightcove-video": "player-url" + "brightcove-video": "player-url", }; for (const card of cards) { @@ -280,7 +280,7 @@ function getEmbedUrl(cards) { if (elem.metadata && elem.metadata[playerUrlField]) { return elem.metadata[playerUrlField]; } - }; + } if (elem.type === "youtube-video" && elem.subtype === null) { if (elem.url) { return elem.url; @@ -446,9 +446,9 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re const isStructuredDataEmpty = Object.keys(structuredData).length === 0; const enableBreadcrumbList = get(structuredData, ["enableBreadcrumbList"], true); const structuredDataTags = get(structuredData, ["structuredDataTags"], []); - let articleData = {}; + // generateRecipePageSchema(publisherConfig, response.data, url, story); if (!isStructuredDataEmpty) { articleData = generateArticleData(structuredData, story, publisherConfig, timezone); structuredDataTags.map((type) => { From a06174a2c94190a015b9d7322ffa362ea4793948 Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:48:02 +0530 Subject: [PATCH 02/18] chore(release): 1.46.4-recipe-schema.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 20ea850b..e9d622a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quintype/seo", - "version": "1.46.3", + "version": "1.46.4-recipe-schema.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@quintype/seo", - "version": "1.46.3", + "version": "1.46.4-recipe-schema.0", "license": "MIT", "dependencies": { "date-fns": "^2.17.0", diff --git a/package.json b/package.json index f857c660..31674315 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quintype/seo", - "version": "1.46.3", + "version": "1.46.4-recipe-schema.0", "description": "SEO Modules for Quintype", "main": "dist/index.cjs.js", "repository": "https://github.com/quintype/quintype-node-seo", From 19e3e91b1fae4f171e2c75ef24ddf8215ddd7fb5 Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:43:17 +0530 Subject: [PATCH 03/18] add recipe schema --- src/structured-data/schema.js | 2 +- src/structured-data/structured-data-tags.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/structured-data/schema.js b/src/structured-data/schema.js index bfd059e1..08334bb8 100644 --- a/src/structured-data/schema.js +++ b/src/structured-data/schema.js @@ -168,7 +168,7 @@ export function generateRecipePageSchema(publisherConfig, data, url, story) { "@type": "Person", name: story["author-name"], }, - image: { "@type": "ImageObject", url: story.recipeUrl }, + image: { "@type": "ImageObject", url: story.url }, description: story.description, recipeIngredient: ["1 cup sugar", "2 cups flour", "1 cup chocolate chips"], recipeInstructions: [ diff --git a/src/structured-data/structured-data-tags.js b/src/structured-data/structured-data-tags.js index 5a6843ee..9e4656ac 100644 --- a/src/structured-data/structured-data-tags.js +++ b/src/structured-data/structured-data-tags.js @@ -3,6 +3,7 @@ import { getQueryParams, stripMillisecondsFromTime } from "../utils"; import { generateTagsForEntity } from "./entity"; import { generateAuthorPageSchema, + generateRecipePageSchema, getSchemaBlogPosting, getSchemaBreadcrumbList, getSchemaContext, @@ -448,7 +449,6 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re const structuredDataTags = get(structuredData, ["structuredDataTags"], []); let articleData = {}; - // generateRecipePageSchema(publisherConfig, response.data, url, story); if (!isStructuredDataEmpty) { articleData = generateArticleData(structuredData, story, publisherConfig, timezone); structuredDataTags.map((type) => { @@ -475,6 +475,10 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re if (!isStructuredDataEmpty && pageType === "story-page") { const newsArticleTags = generateNewsArticleTags(); newsArticleTags ? tags.push(storyTags(), newsArticleTags) : tags.push(storyTags()); + if (story["story-template"] === "recipe") { + const recipeTags = generateRecipePageSchema(publisherConfig, response.data, url, story); + tags.push(recipeTags); + } } if (!isStructuredDataEmpty && pageType === "story-page-amp") { From 12d588ce42fa889b7d9526dc486114524056ee26 Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:44:05 +0530 Subject: [PATCH 04/18] chore(release): 1.46.4-recipe-schema.1 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e9d622a6..44373893 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.0", + "version": "1.46.4-recipe-schema.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.0", + "version": "1.46.4-recipe-schema.1", "license": "MIT", "dependencies": { "date-fns": "^2.17.0", diff --git a/package.json b/package.json index 31674315..251e746d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.0", + "version": "1.46.4-recipe-schema.1", "description": "SEO Modules for Quintype", "main": "dist/index.cjs.js", "repository": "https://github.com/quintype/quintype-node-seo", From 32bf4696c7f5f49cd2e18df884e6fce5d89184ee Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:11:37 +0530 Subject: [PATCH 05/18] add recipe tags in recipe page --- src/structured-data/structured-data-tags.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/structured-data/structured-data-tags.js b/src/structured-data/structured-data-tags.js index 9e4656ac..0471b254 100644 --- a/src/structured-data/structured-data-tags.js +++ b/src/structured-data/structured-data-tags.js @@ -476,8 +476,7 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re const newsArticleTags = generateNewsArticleTags(); newsArticleTags ? tags.push(storyTags(), newsArticleTags) : tags.push(storyTags()); if (story["story-template"] === "recipe") { - const recipeTags = generateRecipePageSchema(publisherConfig, response.data, url, story); - tags.push(recipeTags); + tags.push(ldJson("Recipe", generateRecipePageSchema(publisherConfig, response.data, url, story))); } } From 5d6b3d56e9d423da89dcd433c96ba62aea9aade6 Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:12:16 +0530 Subject: [PATCH 06/18] chore(release): 1.46.4-recipe-schema.2 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 44373893..2b41a8af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.1", + "version": "1.46.4-recipe-schema.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.1", + "version": "1.46.4-recipe-schema.2", "license": "MIT", "dependencies": { "date-fns": "^2.17.0", diff --git a/package.json b/package.json index 251e746d..d36a58d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@quintype/seo", - "version": "1.46.4-recipe-schema.1", + "version": "1.46.4-recipe-schema.2", "description": "SEO Modules for Quintype", "main": "dist/index.cjs.js", "repository": "https://github.com/quintype/quintype-node-seo", From 2acb335dc22bcb4328da4d39a2093fcbed6abefd Mon Sep 17 00:00:00 2001 From: phaneendra <58028287+cricket-lover@users.noreply.github.com> Date: Thu, 25 Jul 2024 11:19:17 +0530 Subject: [PATCH 07/18] add recipe schema --- src/structured-data/schema.js | 52 +++++++-------------- src/structured-data/structured-data-tags.js | 16 ++++++- src/utils.js | 16 +++++++ 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/src/structured-data/schema.js b/src/structured-data/schema.js index 08334bb8..461eb735 100644 --- a/src/structured-data/schema.js +++ b/src/structured-data/schema.js @@ -1,6 +1,6 @@ import { get } from "lodash"; import { getTitle } from "../generate-common-seo"; -import { stripMillisecondsFromTime } from "../utils"; +import { extractTextFromHtmlString, getCardAttributes, stripMillisecondsFromTime } from "../utils"; export const getSchemaContext = { "@context": "http://schema.org" }; export function getSchemaType(type) { @@ -152,46 +152,28 @@ export function generateAuthorPageSchema(publisherConfig, data, url) { }; } -export function generateRecipePageSchema(publisherConfig, data, url, story) { - const sketchesHost = publisherConfig["sketches-host"]; - const publisherName = getTitle(publisherConfig); - const authorHREF = url["href"]; - const authorURL = `${sketchesHost}${authorHREF}`; - const authorName = get(data, ["author", "name"], ""); - // console.log("generateRecipePageSchema --->", { publisherConfig, data, url, story }); +export function generateRecipePageSchema(story) { + const { headline, url, "author-name": authorName } = story; + + const cardsWithAttributes = story.cards.filter((card) => getCardAttributes(card, "cardtype")); + const cardWithIngredients = cardsWithAttributes.filter((card) => + getCardAttributes(card, "cardtype").includes("ingredients ") + ); + const ingredientsRichText = cardWithIngredients[0]["story-elements"][0].text; + const ingredients = extractTextFromHtmlString(ingredientsRichText); + const instructions = []; + return { "@context": "https://schema.org/", "@type": "Recipe", - name: story.headline, - url: story.url, + name: headline, + url: url, author: { "@type": "Person", - name: story["author-name"], + name: authorName, }, - image: { "@type": "ImageObject", url: story.url }, description: story.description, - recipeIngredient: ["1 cup sugar", "2 cups flour", "1 cup chocolate chips"], - recipeInstructions: [ - { - "@type": "HowToStep", - text: "Preheat the oven to 350 degrees F.", - }, - { - "@type": "HowToStep", - text: "Mix the sugar and flour.", - }, - { - "@type": "HowToStep", - text: "Add the chocolate chips and bake for 10 minutes.", - }, - ], - recipeYield: "24 cookies", - prepTime: "PT20M", - cookTime: "PT10M", - totalTime: "PT30M", - nutrition: { - "@type": "NutritionInformation", - calories: "200 calories", - }, + recipeIngredient: ingredients, + recipeInstructions: instructions, }; } diff --git a/src/structured-data/structured-data-tags.js b/src/structured-data/structured-data-tags.js index 0471b254..172065c4 100644 --- a/src/structured-data/structured-data-tags.js +++ b/src/structured-data/structured-data-tags.js @@ -476,7 +476,21 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re const newsArticleTags = generateNewsArticleTags(); newsArticleTags ? tags.push(storyTags(), newsArticleTags) : tags.push(storyTags()); if (story["story-template"] === "recipe") { - tags.push(ldJson("Recipe", generateRecipePageSchema(publisherConfig, response.data, url, story))); + const recipeTags = generateRecipePageSchema(story); + recipeTags.image = Object.assign( + { + "@type": "ImageObject", + }, + generateArticleImageData(story["hero-image-s3-key"], publisherConfig) + ); + recipeTags.video = Object.assign( + { + "@type": "VideoObject", + }, + generateVideoArticleData(structuredData, story, publisherConfig, timezone) + ); + + tags.push(ldJson("Recipe", recipeTags)); } } diff --git a/src/utils.js b/src/utils.js index bd4c1977..008823d1 100644 --- a/src/utils.js +++ b/src/utils.js @@ -8,6 +8,22 @@ export function objectToTags(object) { .map(([key, value]) => ({ [getPropertyName(key)]: key, content: value })); } +export function extractTextFromHtmlString(html) { + const regex = /
(.*?)<\/p>/g;
+ const textContents = [];
+
+ let match;
+ while ((match = regex.exec(html)) !== null) {
+ textContents.push(match[1]);
+ }
+
+ return textContents;
+}
+
+export const getCardAttributes = (card, type) => {
+ return card.metadata.attributes[type];
+};
+
function getPropertyName(key) {
return key.startsWith("fb:") || key.startsWith("og:") ? "property" : "name";
}
From 6403e84fb0ff61d6263c80d9a4516f9ddd7d8bdd Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Thu, 25 Jul 2024 11:27:43 +0530
Subject: [PATCH 08/18] chore(release): 1.46.4-recipe-schema.3
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 2b41a8af..8b558bef 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.2",
+ "version": "1.46.4-recipe-schema.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.2",
+ "version": "1.46.4-recipe-schema.3",
"license": "MIT",
"dependencies": {
"date-fns": "^2.17.0",
diff --git a/package.json b/package.json
index d36a58d7..0ddb4775 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.2",
+ "version": "1.46.4-recipe-schema.3",
"description": "SEO Modules for Quintype",
"main": "dist/index.cjs.js",
"repository": "https://github.com/quintype/quintype-node-seo",
From c045ed59f462b0bb2bb8d21f3e6ff1463f026164 Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Thu, 25 Jul 2024 14:33:59 +0530
Subject: [PATCH 09/18] pr changes
---
src/structured-data/schema.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/structured-data/schema.js b/src/structured-data/schema.js
index 461eb735..9eaed98b 100644
--- a/src/structured-data/schema.js
+++ b/src/structured-data/schema.js
@@ -153,7 +153,7 @@ export function generateAuthorPageSchema(publisherConfig, data, url) {
}
export function generateRecipePageSchema(story) {
- const { headline, url, "author-name": authorName } = story;
+ const { headline, url, "author-name": authorName, description } = story;
const cardsWithAttributes = story.cards.filter((card) => getCardAttributes(card, "cardtype"));
const cardWithIngredients = cardsWithAttributes.filter((card) =>
@@ -161,7 +161,6 @@ export function generateRecipePageSchema(story) {
);
const ingredientsRichText = cardWithIngredients[0]["story-elements"][0].text;
const ingredients = extractTextFromHtmlString(ingredientsRichText);
- const instructions = [];
return {
"@context": "https://schema.org/",
@@ -172,8 +171,7 @@ export function generateRecipePageSchema(story) {
"@type": "Person",
name: authorName,
},
- description: story.description,
+ description: description,
recipeIngredient: ingredients,
- recipeInstructions: instructions,
};
}
From 81d40e1498001ccf63a5b9ab04349108673df3c9 Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Thu, 25 Jul 2024 14:34:42 +0530
Subject: [PATCH 10/18] chore(release): 1.46.4-recipe-schema.4
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8b558bef..0c28f543 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.3",
+ "version": "1.46.4-recipe-schema.4",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.3",
+ "version": "1.46.4-recipe-schema.4",
"license": "MIT",
"dependencies": {
"date-fns": "^2.17.0",
diff --git a/package.json b/package.json
index 0ddb4775..72235cfa 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.3",
+ "version": "1.46.4-recipe-schema.4",
"description": "SEO Modules for Quintype",
"main": "dist/index.cjs.js",
"repository": "https://github.com/quintype/quintype-node-seo",
From 6b4d8c7bbd976c8aa46d67f4fb5a4f54c99d3efd Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Wed, 31 Jul 2024 16:51:20 +0530
Subject: [PATCH 11/18] pr changes
---
src/structured-data/schema.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/structured-data/schema.js b/src/structured-data/schema.js
index 9eaed98b..0a83b75b 100644
--- a/src/structured-data/schema.js
+++ b/src/structured-data/schema.js
@@ -159,7 +159,7 @@ export function generateRecipePageSchema(story) {
const cardWithIngredients = cardsWithAttributes.filter((card) =>
getCardAttributes(card, "cardtype").includes("ingredients ")
);
- const ingredientsRichText = cardWithIngredients[0]["story-elements"][0].text;
+ const ingredientsRichText = get(cardWithIngredients, ["0", "story-elements", "0", "text"], "");
const ingredients = extractTextFromHtmlString(ingredientsRichText);
return {
From aa2fcd63d666eed6a1fd032d8b008392b1af2089 Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Wed, 31 Jul 2024 16:52:10 +0530
Subject: [PATCH 12/18] chore(release): 1.46.4-recipe-schema.5
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 0c28f543..63468e3d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.4",
+ "version": "1.46.4-recipe-schema.5",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.4",
+ "version": "1.46.4-recipe-schema.5",
"license": "MIT",
"dependencies": {
"date-fns": "^2.17.0",
diff --git a/package.json b/package.json
index 72235cfa..5a1474a4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.4",
+ "version": "1.46.4-recipe-schema.5",
"description": "SEO Modules for Quintype",
"main": "dist/index.cjs.js",
"repository": "https://github.com/quintype/quintype-node-seo",
From 0007d21117af44bc6dd398d0f3d00b71d7cba5dd Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Mon, 19 Aug 2024 16:57:21 +0530
Subject: [PATCH 13/18] add recipe schema for amp pages
---
src/structured-data/structured-data-tags.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/structured-data/structured-data-tags.js b/src/structured-data/structured-data-tags.js
index 172065c4..9e93761a 100644
--- a/src/structured-data/structured-data-tags.js
+++ b/src/structured-data/structured-data-tags.js
@@ -497,6 +497,23 @@ export function StructuredDataTags({ structuredData = {} }, config, pageType, re
if (!isStructuredDataEmpty && pageType === "story-page-amp") {
const newsArticleTags = generateNewsArticleTags();
newsArticleTags ? tags.push(storyTags(), newsArticleTags) : tags.push(storyTags());
+ if (story["story-template"] === "recipe") {
+ const recipeTags = generateRecipePageSchema(story);
+ recipeTags.image = Object.assign(
+ {
+ "@type": "ImageObject",
+ },
+ generateArticleImageData(story["hero-image-s3-key"], publisherConfig)
+ );
+ recipeTags.video = Object.assign(
+ {
+ "@type": "VideoObject",
+ },
+ generateVideoArticleData(structuredData, story, publisherConfig, timezone)
+ );
+
+ tags.push(ldJson("Recipe", recipeTags));
+ }
}
if (!isStructuredDataEmpty && structuredData.header) {
From 7470894daa07aa891b54a4af0271e7ecb97a6a68 Mon Sep 17 00:00:00 2001
From: phaneendra <58028287+cricket-lover@users.noreply.github.com>
Date: Mon, 19 Aug 2024 16:58:18 +0530
Subject: [PATCH 14/18] chore(release): 1.46.4-recipe-schema.6
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 63468e3d..ca42381a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.5",
+ "version": "1.46.4-recipe-schema.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.5",
+ "version": "1.46.4-recipe-schema.6",
"license": "MIT",
"dependencies": {
"date-fns": "^2.17.0",
diff --git a/package.json b/package.json
index 5a1474a4..842744d4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@quintype/seo",
- "version": "1.46.4-recipe-schema.5",
+ "version": "1.46.4-recipe-schema.6",
"description": "SEO Modules for Quintype",
"main": "dist/index.cjs.js",
"repository": "https://github.com/quintype/quintype-node-seo",
From 39214e1022752a547d1b12a9523381c5706af68e Mon Sep 17 00:00:00 2001
From: VeenaYemmiganur (.*?)<\/p>/g;
- const textContents = [];
-
- let match;
- while ((match = regex.exec(html)) !== null) {
- textContents.push(match[1]);
- }
-
- return textContents;
-}
-
-export const getCardAttributes = (card, type) => {
- return card.metadata.attributes[type];
-};
-
function getPropertyName(key) {
return key.startsWith("fb:") || key.startsWith("og:") ? "property" : "name";
}
From f4e07eab47c9e59a21a66af10d1112c8df29de5c Mon Sep 17 00:00:00 2001
From: VeenaYemmiganur