+1
-6
components/post-list-item.tsx
+1
-6
components/post-list-item.tsx
···
72
72
<Title className="text-lg w-full" level="h3">
73
73
{post.title}
74
74
</Title>
75
-
{post.subtitle && (
76
-
<p className="text-sm text-slate-600 dark:text-slate-300 font-serif italic line-clamp-2">
77
-
{post.subtitle}
78
-
</p>
79
-
)}
80
75
<PostInfo
81
76
content={post.content}
82
77
createdAt={post.createdAt}
···
84
79
/>
85
80
<div className="grid transition-[grid-template-rows,opacity] duration-300 ease-[cubic-bezier(0.33,0,0.67,1)] grid-rows-[0fr] group-hover:grid-rows-[1fr] opacity-0 group-hover:opacity-100 mt-2">
86
81
<div className="overflow-hidden">
87
-
<p className="text-sm text-slate-600 dark:text-slate-300 line-clamp-3 break-words">
82
+
<p className="text-sm line-clamp-3 break-words">
88
83
{post.content.substring(0, 280)}
89
84
</p>
90
85
</div>
+8
-8
routes/post/[slug].tsx
+8
-8
routes/post/[slug].tsx
···
11
11
interface Post {
12
12
uri: string;
13
13
value: {
14
-
title: string;
14
+
title?: string;
15
15
subtitle?: string;
16
-
content: string;
17
-
createdAt: string;
16
+
content?: string;
17
+
createdAt?: string;
18
18
};
19
19
}
20
20
···
127
127
<div class="max-w-[600px] mx-auto">
128
128
<article class="w-full space-y-8">
129
129
<div class="space-y-4 w-full">
130
-
<Title>{post.value.title}</Title>
130
+
<Title>{post.value.title || 'Untitled'}</Title>
131
131
{post.value.subtitle && (
132
-
<p class="text-xl text-slate-600 dark:text-slate-300 font-serif italic">
132
+
<p class="text-2xl md:text-3xl font-serif leading-relaxed max-w-prose">
133
133
{post.value.subtitle}
134
134
</p>
135
135
)}
136
136
<PostInfo
137
-
content={post.value.content}
138
-
createdAt={post.value.createdAt}
137
+
content={post.value.content || ''}
138
+
createdAt={post.value.createdAt || new Date().toISOString()}
139
139
includeAuthor
140
140
className="text-sm"
141
141
/>
···
146
146
class="mt-8 markdown-body"
147
147
// replace old pds url with new one for blob urls
148
148
dangerouslySetInnerHTML={{
149
-
__html: render(post.value.content).replace(
149
+
__html: render(post.value.content || '').replace(
150
150
/puffball\.us-east\.host\.bsky\.network/g,
151
151
"knotbin.xyz",
152
152
),