Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions design/og.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ interface Props {
const { title, description, noindex = false } = Astro.props;
const currentPath = Astro.url.pathname;
const canonicalURL = new URL(currentPath, Astro.site);
// Social cards need an absolute URL; relative paths are ignored by every scraper.
const ogImageURL = new URL('/og.png', Astro.site);

const navLinks = [
{ href: "/", label: "Home" },
Expand Down Expand Up @@ -42,6 +44,24 @@ import '../styles/global.css';
<link rel="canonical" href={canonicalURL} />
)
}

<meta property="og:type" content="website" />
<meta property="og:site_name" content="Flix" />
<meta property="og:title" content={title} />
<meta property="og:description" content={description} />
<meta property="og:url" content={canonicalURL} />
<meta property="og:image" content={ogImageURL} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta
property="og:image:alt"
content="Flix — a powerful effect-oriented programming language"
/>

{/* Title, description, and image fall back to the og: tags above. */}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@flixlang" />

<link href="/favicon.png" rel="icon">
</head>
<body>
Expand Down