Skip to content

Commit

Permalink
Update theme config
Browse files Browse the repository at this point in the history
  • Loading branch information
leoafarias committed Jan 31, 2024
1 parent d10bfad commit d7dd670
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion website/theme.config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,28 @@ const themeConfig = {
return `${origin}/assets/og/${ogImage}`;
};

const title = () => {
if (frontMatter.title) {
return frontMatter.title + " – " + packageName;
}
return packageName;
};

return (
<>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{title()}</title>
<meta
name="description"
content={frontMatter.description || description}
/>

{/* Open Graph */}
<meta property="og:site_name" content={packageName} />
<meta property="og:type" content="website" />
<meta property="og:image" content={ogImage()} />
<meta property="og:url" content={origin} />
<meta property="og:title" content={frontMatter.title || packageName} />
<meta property="og:title" content={title()} />
<meta
property="og:description"
content={frontMatter.description || description}
Expand Down

0 comments on commit d7dd670

Please sign in to comment.