Accept date in badges. Fix errors in build.

Our guidelines suggest adding a date when using the badge markdoc
component, but until now the component's schema didn't have a defintion
for the date parameter, so it was reporting errors.

The date doesn't affect how the badge is displayed on the site, but
we can use it to see when a 'New in' badge is old enough to no longer be
relevant (typically >2yrs) so we can remove it.
This commit is contained in:
mDuo13
2024-04-24 11:12:57 -07:00
parent bef68f38a4
commit 6c4ae6c319

View File

@@ -122,6 +122,10 @@ export const badge: Schema & { tagName: string } = {
href: {
type: 'String',
required: false
},
date: { // Not displayed, but useful for knowing how old an 'updated' badge is
type: 'String',
required: false
}
},
render: 'Badge'