Skip to content

Add Open Graph metadata to docs for link previews #85

@mrpollo

Description

@mrpollo

The docs site at https://px4.github.io/Hawkeye/ currently has no Open Graph or Twitter Card metadata, so when the URL is shared on Discord, Slack, Twitter/X, iMessage, LinkedIn, etc. it unfurls as a bare text preview with no image. Adding a handful of meta tags would give it a proper card with cover.png as the preview, the tagline as the description, and consistent branding across platforms.

Concretely, add to the head array in docs/.vitepress/config.ts:

```ts
['meta', { property: 'og:type', content: 'website' }],
['meta', { property: 'og:title', content: 'Hawkeye' }],
['meta', { property: 'og:description', content: 'Real-time 3D flight visualizer for PX4' }],
['meta', { property: 'og:image', content: 'https://artifacts.px4.io/hawkeye/cover.png' }],
['meta', { property: 'og:url', content: 'https://px4.github.io/Hawkeye/' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:title', content: 'Hawkeye' }],
['meta', { name: 'twitter:description', content: 'Real-time 3D flight visualizer for PX4' }],
['meta', { name: 'twitter:image', content: 'https://artifacts.px4.io/hawkeye/cover.png' }],
```

Verify after deploy with https://www.opengraph.xyz/ or by pasting the URL into Discord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions