Skip to content

Commit

Permalink
Merge pull request #9340 from guardian/olly/tag-fronts-missing-bio
Browse files Browse the repository at this point in the history
Fix tag fronts that were missing a bio/description
  • Loading branch information
OllysCoding authored Oct 26, 2023
2 parents ad2a881 + f976e8d commit b5893aa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions dotcom-rendering/src/model/front-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,9 @@
"bio": {
"type": "string"
},
"description": {
"type": "string"
},
"bylineImageUrl": {
"type": "string"
},
Expand Down Expand Up @@ -1421,6 +1424,9 @@
"bio": {
"type": "string"
},
"description": {
"type": "string"
},
"bylineImageUrl": {
"type": "string"
},
Expand Down Expand Up @@ -2131,6 +2137,9 @@
"bio": {
"type": "string"
},
"description": {
"type": "string"
},
"bylineImageUrl": {
"type": "string"
},
Expand Down
6 changes: 6 additions & 0 deletions dotcom-rendering/src/model/tag-front-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
"bio": {
"type": "string"
},
"description": {
"type": "string"
},
"bylineImageUrl": {
"type": "string"
},
Expand Down Expand Up @@ -738,6 +741,9 @@
"bio": {
"type": "string"
},
"description": {
"type": "string"
},
"bylineImageUrl": {
"type": "string"
},
Expand Down
4 changes: 3 additions & 1 deletion dotcom-rendering/src/server/index.front.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ const enhanceTagFront = (body: unknown): DCRTagFrontType => {
trendingTopics: extractTrendingTopics(data.contents, data.pageId),
header: {
title: data.webTitle,
description: data.tags.tags[0]?.properties.bio,
description:
data.tags.tags[0]?.properties.bio ??
data.tags.tags[0]?.properties.description,
image: data.tags.tags[0]?.properties.bylineImageUrl,
},
};
Expand Down
1 change: 1 addition & 0 deletions dotcom-rendering/src/types/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export type FETagType = {
webTitle: string;
/* bio is html */
bio?: string;
description?: string;
bylineImageUrl?: string;
bylineLargeImageUrl?: string;
contributorLargeImagePath?: string;
Expand Down

0 comments on commit b5893aa

Please sign in to comment.