Skip to content

Commit

Permalink
feat(jsonld): adds keywords for SoftwareApp schema
Browse files Browse the repository at this point in the history
  • Loading branch information
RainGrid committed Oct 4, 2023
1 parent f8b907f commit 3c4f3ef
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3027,6 +3027,7 @@ export default () => (
aggregateRating={{ ratingValue: '4.6', reviewCount: '8864' }}
operatingSystem="ANDROID"
applicationCategory="GameApplication"
keywords="angrybirds, arcade, slingshot"
/>
</>
);
Expand All @@ -3052,7 +3053,13 @@ export default () => (
| `operatingSystem` | The operating System supported by the game it self. |
| `applicationCategory` | Desktop Software or Video Game... |

For reference and more info check [Google docs for Software App](https://developers.google.com/search/docs/data-types/software-app)
**Data other properties**

| Property | Info |
| ---------- | ---------------------------------------------------------------------------------------------------------------------- |
| `keywords` | Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. |

For reference and more info check [Google docs for Software App](https://developers.google.com/search/docs/data-types/software-app) and [Schema.org docs](https://schema.org/SoftwareApplication)

### Organization

Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/softwareApp.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ describe('SoftwareApp JSON-LD', () => {
price: '1.00',
priceCurrency: 'USD',
},
keywords: 'angrybirds, arcade, slingshot',
});
});
});
Expand Down
4 changes: 4 additions & 0 deletions cypress/schemas/software-app-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ const softwareApp100 = {
},
},
},
keywords: {
type: 'string',
},
},
},
example: {
Expand All @@ -70,6 +73,7 @@ const softwareApp100 = {
price: '1.00',
priceCurrency: 'USD',
},
keywords: 'angrybirds, arcade, slingshot',
},
};

Expand Down
1 change: 1 addition & 0 deletions e2e/pages/jsonld/softwareApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function SoftwareApp() {
aggregateRating={{ ratingValue: '4.6', ratingCount: '8864' }}
operatingSystem="ANDROID"
applicationCategory="GameApplication"
keywords="angrybirds, arcade, slingshot"
/>
</>
);
Expand Down
3 changes: 3 additions & 0 deletions src/jsonld/softwareApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface SoftwareAppJsonLdProps extends JsonLdProps {
operatingSystem?: string;
review?: Review;
aggregateRating?: AggregateRating;
keywords?: string;
}

function SoftwareAppJsonLd({
Expand All @@ -22,6 +23,7 @@ function SoftwareAppJsonLd({
price,
aggregateRating,
review,
keywords,
...rest
}: SoftwareAppJsonLdProps) {
const data = {
Expand All @@ -33,6 +35,7 @@ function SoftwareAppJsonLd({
},
aggregateRating: setAggregateRating(aggregateRating),
review: setReviews(review),
keywords,
};
return (
<JsonLd
Expand Down

0 comments on commit 3c4f3ef

Please sign in to comment.