Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
reddy-vishwanath committed Oct 30, 2024
1 parent 746df01 commit b2bbf70
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions global.html
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ <h5>Parameters:</h5>
<p class="tag-source">
<a href="src_structured-data_structured-data-tags.js.html" class="button">View Source</a>
<span>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line458">line 458</a>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line466">line 466</a>
</span>
</p>

Expand Down Expand Up @@ -2245,7 +2245,7 @@ <h4 class="name" id="Organization">
<p class="tag-source">
<a href="src_structured-data_structured-data-tags.js.html" class="button">View Source</a>
<span>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line394">line 394</a>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line402">line 402</a>
</span>
</p>

Expand Down Expand Up @@ -2629,7 +2629,7 @@ <h5 class="subsection-title">Properties:</h5>
<p class="tag-source">
<a href="src_structured-data_structured-data-tags.js.html" class="button">View Source</a>
<span>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line424">line 424</a>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line432">line 432</a>
</span>
</p>

Expand Down Expand Up @@ -2708,7 +2708,7 @@ <h4 class="name" id="Website">
<p class="tag-source">
<a href="src_structured-data_structured-data-tags.js.html" class="button">View Source</a>
<span>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line408">line 408</a>
<a href="src_structured-data_structured-data-tags.js.html">src/structured-data/structured-data-tags.js</a>, <a href="src_structured-data_structured-data-tags.js.html#line416">line 416</a>
</span>
</p>

Expand Down
8 changes: 8 additions & 0 deletions src_structured-data_structured-data-tags.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ <h1>src/structured-data/structured-data-tags.js</h1>
const storyAccessType = storyAccess(story["access"]);
const authorSchema = (structuredData.authorSchema &amp;&amp; structuredData.authorSchema(story)) || [];
const isAccessibleForFree = storyAccessType ? {} : { isAccessibleForFree: storyAccessType };
const metadata = get(story, ["metadata"], {});
const sponsor = metadata.hasOwnProperty("sponsored-by") ? { sponsor: { name: metadata["sponsored-by"] } } : {};

return Object.assign(
{},
generateCommonData(structuredData, story, publisherConfig, timezone),
Expand All @@ -217,6 +220,7 @@ <h1>src/structured-data/structured-data-tags.js</h1>
image: generateArticleImageData(story["hero-image-s3-key"], publisherConfig),
},
isAccessibleForFree,
sponsor,
{ isPartOf: generateIsPartOfDataForArticle(story, publisherConfig) },
articleSectionObj(story)
);
Expand Down Expand Up @@ -305,12 +309,16 @@ <h1>src/structured-data/structured-data-tags.js</h1>
const { alternative = {} } = story.alternative || {};
const storyAccessType = storyAccess(story["access"]);
const isAccessibleForFree = storyAccessType ? {} : { isAccessibleForFree: storyAccessType };
const metadata = get(story, ["metadata"], {});
const sponsor = metadata.hasOwnProperty("sponsored-by") ? { sponsor: { name: metadata["sponsored-by"] } } : {};

return Object.assign(
{},
{
alternativeHeadline: alternative.home &amp;&amp; alternative.home.default ? alternative.home.default.headline : "",
description: story.summary,
},
sponsor,
isAccessibleForFree,
{ isPartOf: generateIsPartOfDataForNewsArticle(story, publisherConfig, pageType, structuredData) },
generateHasPartData(storyAccessType)
Expand Down

0 comments on commit b2bbf70

Please sign in to comment.