Skip to content

Commit 291f5ad

Browse files
committed
feat: custom share message
1 parent 71f2af5 commit 291f5ad

File tree

5 files changed

+70
-6
lines changed

5 files changed

+70
-6
lines changed

.claude/skills/write-blog-post/SKILL.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,65 @@ Help craft:
4646
- **Description**: Clear summary (120-160 characters)
4747
- **Topic**: tech | marketing | entrepreneurship | productivity | health
4848
- **Tags**: 3-5 relevant tags (lowercase, hyphenated)
49+
- **Share Message**: A baity but neutral hook (50-100 characters) that creates curiosity without hype - use questions, contrasts, or surprising insights
4950

5051
**Important**: Once title is decided, ask:
5152

5253
> "Please provide a URL to a cover image for this blog post. This will be displayed on the homepage card."
5354
55+
### Share Message Guidelines
56+
57+
Create a **baity but neutral** share message that hooks readers while maintaining a conversational tone:
58+
59+
- **Include a hook or curiosity gap** that makes people want to click
60+
- **Sounds natural**, like you're casually sharing something intriguing with a friend
61+
- **Teases the insight** without giving it away completely
62+
- **Stays neutral in tone** - no excessive enthusiasm or hyperbole
63+
- **Is concise** (50-100 characters)
64+
- **Uses questions, contrasts, or surprising elements** to create interest
65+
66+
**Hook Techniques (Neutral Style):**
67+
68+
1. **Question Hook**: Pose an intriguing question
69+
70+
- "Why does [common thing] actually work differently than you think?"
71+
- "What if [assumption] is backwards?"
72+
73+
2. **Contrast Hook**: Present an unexpected contrast
74+
75+
- "The counterintuitive way [outcome] actually happens"
76+
- "[Common approach] vs what actually works"
77+
78+
3. **Surprising Insight**: Tease a non-obvious realization
79+
80+
- "The overlooked factor in [topic]"
81+
- "What most people miss about [topic]"
82+
83+
4. **Problem/Solution Tease**: Hint at solving a pain point
84+
- "A different angle on [common problem]"
85+
- "Rethinking [topic] from first principles"
86+
87+
**Good Examples (Baity + Neutral):**
88+
89+
- "Why [common thing] might not work the way you think"
90+
- "The surprising connection between [A] and [B]"
91+
- "What I learned after [doing X]"
92+
- "A counterintuitive take on [topic]"
93+
- "[Topic]: the part most people overlook"
94+
- "Rethinking how we approach [topic]"
95+
- "The hidden tradeoff in [common practice]"
96+
- "Why [assumption] doesn't hold up"
97+
98+
**Bad Examples:**
99+
100+
- ❌ "Amazing article about [topic] - must read!" (too enthusiastic)
101+
- ❌ "This will blow your mind!" (overly hyped)
102+
- ❌ "The ultimate guide to [topic]!" (generic clickbait)
103+
- ❌ "[Topic] explained (you won't believe #3!)" (cheap clickbait)
104+
- ❌ "SHOCKING truth about [topic]" (excessive caps/drama)
105+
106+
**The Goal**: Create curiosity and interest without sounding like a used car salesman. Think "hmm, that's interesting" rather than "OMG YOU NEED TO READ THIS!!!"
107+
54108
### Step 4: Get Author Info
55109

56110
Run to get git username:
@@ -85,6 +139,7 @@ export const frontmatter = {
85139
topic: 'tech' as const,
86140
tags: ['tag1', 'tag2', 'tag3'],
87141
coverImage: 'https://example.com/image.jpg',
142+
shareMessage: 'Why [topic] might not work the way you think',
88143
};
89144
90145
const post = getBlogPost('post-slug')!;

src/components/SocialShareButtons.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@ interface SocialShareButtonsProps {
44
title: string;
55
description: string;
66
url: string;
7+
shareMessage?: string;
78
}
89

9-
export function SocialShareButtons({ title, description, url }: SocialShareButtonsProps) {
10+
export function SocialShareButtons({ title, description, url, shareMessage }: SocialShareButtonsProps) {
1011
const encodedUrl = encodeURIComponent(url);
1112
const encodedTitle = encodeURIComponent(title);
12-
const encodedText = encodeURIComponent(`${title} - ${description}`);
13+
// Use custom share message if provided, otherwise fall back to title
14+
const shareText = shareMessage || title;
15+
const encodedShareText = encodeURIComponent(shareText);
16+
const encodedText = encodeURIComponent(`${shareText} ${url}`);
1317

1418
const handleShareClick = (platform: string) => {
1519
// Track share button click with Plausible
@@ -22,7 +26,7 @@ export function SocialShareButtons({ title, description, url }: SocialShareButto
2226
{
2327
name: 'Twitter',
2428
icon: FaTwitter,
25-
url: `https://twitter.com/intent/tweet?text=${encodedTitle}&url=${encodedUrl}`,
29+
url: `https://twitter.com/intent/tweet?text=${encodedShareText}&url=${encodedUrl}`,
2630
color: 'hover:text-[#1DA1F2]',
2731
},
2832
{
@@ -40,19 +44,19 @@ export function SocialShareButtons({ title, description, url }: SocialShareButto
4044
{
4145
name: 'Reddit',
4246
icon: FaReddit,
43-
url: `https://reddit.com/submit?url=${encodedUrl}&title=${encodedTitle}`,
47+
url: `https://reddit.com/submit?url=${encodedUrl}&title=${encodedShareText}`,
4448
color: 'hover:text-[#FF4500]',
4549
},
4650
{
4751
name: 'Telegram',
4852
icon: FaTelegram,
49-
url: `https://t.me/share/url?url=${encodedUrl}&text=${encodedTitle}`,
53+
url: `https://t.me/share/url?url=${encodedUrl}&text=${encodedShareText}`,
5054
color: 'hover:text-[#26A5E4]',
5155
},
5256
{
5357
name: 'WhatsApp',
5458
icon: FaWhatsapp,
55-
url: `https://wa.me/?text=${encodedText} ${encodedUrl}`,
59+
url: `https://wa.me/?text=${encodedText}`,
5660
color: 'hover:text-[#25D366]',
5761
},
5862
];

src/layouts/BlogPostLayout.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ const postUrl = `${config.site.url}/blog/${post.slug}`;
111111
title={post.title}
112112
description={post.description}
113113
url={postUrl}
114+
shareMessage={post.shareMessage}
114115
client:load
115116
/>
116117
</div>

src/lib/blog-posts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export interface BlogPost {
77
topic: 'tech' | 'marketing' | 'entrepreneurship' | 'productivity' | 'health';
88
tags: string[];
99
image?: string;
10+
shareMessage?: string;
1011
}
1112

1213
interface AstroModule {
@@ -18,6 +19,7 @@ interface AstroModule {
1819
topic: 'tech' | 'marketing' | 'entrepreneurship' | 'productivity' | 'health';
1920
tags?: string[];
2021
image?: string;
22+
shareMessage?: string;
2123
};
2224
}
2325

@@ -48,6 +50,7 @@ function loadBlogPosts(): BlogPost[] {
4850
topic: frontmatter.topic,
4951
tags: frontmatter.tags || [],
5052
image: frontmatter.image,
53+
shareMessage: frontmatter.shareMessage,
5154
});
5255
}
5356
}

src/pages/blog/the-llm-inflation-paradox.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export const frontmatter = {
1111
date: '2025-10-29',
1212
topic: 'tech' as const,
1313
tags: ['ai', 'efficiency', 'systems-thinking'],
14+
shareMessage: 'Why AI-written emails might be slowing everything down',
1415
};
1516
1617
const post = getBlogPost('the-llm-inflation-paradox')!;

0 commit comments

Comments
 (0)