mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
For twitter and og image nested properties we should render them as snake case according to [og spec](https://ogp.me/) and [twitter card docs](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started). For typing we keep them as camel case and then convert them to snake case during render This issue is reported in #47960 that user thinks the types are incorrect, but turns out twitter metadata didn't render it correctly Closes #47960
20 lines
388 B
TypeScript
20 lines
388 B
TypeScript
export default function page() {
|
|
return 'twitter summary'
|
|
}
|
|
|
|
export const metadata = {
|
|
twitter: {
|
|
title: 'Twitter Title',
|
|
description: 'Twitter Description',
|
|
siteId: 'siteId',
|
|
creator: 'creator',
|
|
creatorId: 'creatorId',
|
|
images: [
|
|
{
|
|
url: 'https://twitter.com/image.png',
|
|
secureUrl: 'https://twitter.com/secure.png',
|
|
},
|
|
],
|
|
},
|
|
}
|