Skip to content

Commit 9e48eaa

Browse files
feat: add OG metadata tags for rich link previews (#1230)
Adds Open Graph and Twitter Card meta tags to enable rich link previews when sharing Windmill links on social platforms (Discord, Twitter, Slack, LinkedIn, WhatsApp, etc.). Changes: - Add SeoHead component with configurable OG meta tags - Add og_preview.png image for social media previews - Update index.js to use SeoHead component The image is self-hosted in the repository (no external dependencies). Closes windmill-labs/windmill#1126 Supersedes #1156 Co-authored-by: foskey51 <170395811+foskey51@users.noreply.github.com>
1 parent be80310 commit 9e48eaa

File tree

3 files changed

+44
-10
lines changed

3 files changed

+44
-10
lines changed

src/components/SeoHead.tsx

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React from 'react';
2+
import Head from '@docusaurus/Head';
3+
4+
interface SeoHeadProps {
5+
title?: string;
6+
description?: string;
7+
url?: string;
8+
image?: string;
9+
}
10+
11+
export default function SeoHead({
12+
title = 'Windmill | Build, deploy and monitor internal software at scale',
13+
description = 'For developers who need real code capabilities without platform engineering overhead. Turn scripts into auto-generated UIs, APIs and cron jobs. Compose them as workflows or data pipelines.',
14+
url = 'https://www.windmill.dev/',
15+
image = 'https://www.windmill.dev/img/og_preview.png'
16+
}: SeoHeadProps) {
17+
return (
18+
<Head>
19+
<title>{title}</title>
20+
21+
{/* Standard meta tags */}
22+
<meta name="title" content={title} />
23+
<meta name="description" content={description} />
24+
25+
{/* Open Graph / Facebook */}
26+
<meta property="og:type" content="website" />
27+
<meta property="og:url" content={url} />
28+
<meta property="og:title" content={title} />
29+
<meta property="og:description" content={description} />
30+
<meta property="og:image" content={image} />
31+
32+
{/* Twitter */}
33+
<meta name="twitter:card" content="summary_large_image" />
34+
<meta name="twitter:url" content={url} />
35+
<meta name="twitter:title" content={title} />
36+
<meta name="twitter:description" content={description} />
37+
<meta name="twitter:image" content={image} />
38+
39+
<link rel="icon" href="/img/logo.svg" />
40+
</Head>
41+
);
42+
}

src/pages/index.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import IntegrationsList from '../landing/IntegrationsList';
55
import LandingSection from '../landing/LandingSection';
66
import CallToAction from '../landing/CallToAction';
77
import EntrepriseFeatures from '../landing/EntrepriseFeatures';
8-
import Head from '@docusaurus/Head';
8+
import SeoHead from '../components/SeoHead';
99
import HeroExample from '../landing/HeroExample';
1010
import LandingHeader from '../landing/LandingHeader';
1111
import LayoutProvider from '@theme/Layout/Provider';
@@ -50,15 +50,7 @@ export default function Home() {
5050
return (
5151
<LayoutProvider>
5252
<main>
53-
<Head>
54-
<title>Windmill | Build, deploy and monitor internal software at scale</title>
55-
<meta name="title" content="Build, deploy and monitor internal software at scale" />
56-
<meta
57-
name="description"
58-
content="For developers who need real code capabilities without platform engineering overhead."
59-
/>
60-
<link rel="icon" href="/img/logo.svg" />
61-
</Head>
53+
<SeoHead />
6254
<HomepageHeader />
6355
</main>
6456
</LayoutProvider>

static/img/og_preview.png

238 KB
Loading

0 commit comments

Comments
 (0)