Skip to content

Commit

Permalink
MWPW-146782: Add Description to Article richresults
Browse files Browse the repository at this point in the history
  • Loading branch information
spandit22 committed Jun 24, 2024
1 parent 5ad4b21 commit 676da48
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/features/richresults.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ function getRichResultsForArticle(type, getMetadata) {
'@type': type,
headLine: getMetadata('og:title'),
image: getMetadata('og:image'),
description: getMetadata('description'),
datePublished: getMetadata('published'),
dateModified: getMetadata('modified'),
author: {
Expand Down
1 change: 1 addition & 0 deletions test/utils/mocks/head-rich-results-article.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="published" content="2022-12-24">
<meta name="modified" content="2022-12-25">
<meta name="authorname" content="Emile Zola">
<meta name="description" content="Jane Doe Description">
<meta name="authorurl" content="https://example.com/zola">
<link rel="icon" href="data:,">

1 change: 1 addition & 0 deletions test/utils/mocks/head-rich-results.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta name="published" content="2022-12-24">
<meta name="modified" content="2022-12-25">
<meta name="authorname" content="Emile Zola">
<meta name="description" content="Jane Doe Description">
<meta name="authorurl" content="https://example.com/zola">
<link rel="icon" href="data:,">

2 changes: 2 additions & 0 deletions test/utils/richresults.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('Rich Results', () => {
'@type': 'Article',
headLine: 'The war is over',
image: 'https://example.com/photos/1x1/photo.jpg',
description: 'Jane Doe Description',
datePublished: '2022-12-24',
dateModified: '2022-12-25',
author: {
Expand All @@ -39,6 +40,7 @@ describe('Rich Results', () => {
'@type': 'NewsArticle',
headLine: 'The war is over',
image: 'https://example.com/photos/1x1/photo.jpg',
description: 'Jane Doe Description',
datePublished: '2022-12-24',
dateModified: '2022-12-25',
author: {
Expand Down

0 comments on commit 676da48

Please sign in to comment.