Skip to content

Commit

Permalink
Open Graph image
Browse files Browse the repository at this point in the history
  • Loading branch information
WesSouza committed Mar 24, 2024
1 parent 7b47ce5 commit 1f2731e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
Binary file added public/enhanced-youtube/GraphImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/BaseHeadMeta.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ export interface Props {
title: string;
description?: string | undefined;
image?: string | undefined;
twitterCardType?: string | undefined;
}
const {
title,
description = '',
image = '/images/Wes-Square.jpg',
twitterCardType = 'summary',
} = Astro.props;
---

Expand All @@ -32,7 +34,7 @@ const {
<meta property="og:image" content={new URL(image, Astro.url)} />

<!-- Twitter -->
<meta property="twitter:card" content="summary" />
<meta property="twitter:card" content={twitterCardType} />
<meta property="twitter:url" content={Astro.url} />
<meta property="twitter:title" content={title} />
<meta property="twitter:description" content={description} />
Expand Down
2 changes: 2 additions & 0 deletions src/pages/enhanced-youtube/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import BaseHeadMeta from '../../components/BaseHeadMeta.astro';
<BaseHeadMeta
title="Enhanced YouTube Safari Extension for visionOS"
description="Improve YouTube's user experience and interface on Apple Vision Pro."
image="/enhanced-youtube/GraphImage.png"
twitterCardType="summary_large_image"
/>
<link
rel="icon"
Expand Down

0 comments on commit 1f2731e

Please sign in to comment.