Extract a DRY pageMeta(title, description) helper that returns both standard and OpenGraph meta tags from a single source of truth.
9 lines
250 B
TypeScript
9 lines
250 B
TypeScript
export function pageMeta(title: string, description: string) {
|
|
return [
|
|
{ title },
|
|
{ name: 'description', content: description },
|
|
{ property: 'og:title', content: title },
|
|
{ property: 'og:description', content: description },
|
|
]
|
|
}
|