Skip to content

Commit 6e4e240

Browse files
committed
Add bluesky share button to blog posts
1 parent b0ba054 commit 6e4e240

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

src/app/blog/[slug]/post-share/index.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import dynamic from 'next/dynamic';
33
import { SocialShareContainer, SocialButton } from './post-share.styles';
44
import type { SocialShareProps } from './post-share.types';
55

6-
import { TwitterX, RedditLogo, DevToLogo, YCombinator, ProductHuntLogo } from '@/components/elements/icon';
6+
import { TwitterX, RedditLogo, DevToLogo, YCombinator, ProductHuntLogo, Butterfly } from '@/components/elements/icon';
77
import { SquareIcon } from '@/components/elements/square-icon';
88
import Stack from '@/components/elements/stack';
99
import { Text } from '@/components/elements/text';
@@ -18,6 +18,15 @@ export const SocialPostShare = ({ postTitle, postUrl, socialLinks }: SocialShare
1818
<SocialShareContainer>
1919
<Text fontSize="m">Share this post:</Text>
2020
<Stack $direction="row" $gap="8px" $gapxl="8px">
21+
<SocialButton
22+
href={socialLinks?.blueskyUrl || `https://bsky.app/intent/compose?text=${postTitle}%3Cbr%3E%3Cbr%3E${fullPostUrl}`}
23+
target="_blank"
24+
rel="noopener noreferrer"
25+
aria-label={`Share ${postTitle} on BlueSky`}
26+
>
27+
<SquareIcon $size="mini" icon={Butterfly} />
28+
</SocialButton>
29+
2130
<SocialButton
2231
href={socialLinks?.twitterUrl || `https://twitter.com/intent/tweet?text=${postTitle}&url=${fullPostUrl}`}
2332
target="_blank"

src/components/elements/icon/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
Heart,
2222
Article,
2323
RedditLogo,
24+
Butterfly,
2425
X,
2526
Gear,
2627
NetworkSlash,
@@ -100,6 +101,7 @@ export {
100101
Heart,
101102
Article,
102103
RedditLogo,
104+
Butterfly,
103105
DockerLogo,
104106
ElectronLogo,
105107
JavaLogo,

src/types/global.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ interface Post {
4141
};
4242
socialLinks?: {
4343
twitterUrl?: string;
44+
blueskyUrl?: string;
4445
redditUrl?: string;
4546
hackerNewsUrl?: string;
4647
devToUrl?: string;

0 commit comments

Comments
 (0)