-
-
+ <>
+
-
-
- ← Back to blog
-
-
-
- {post.category}
-
- {post.title}
-
-
- {post.author} - {post.date} - {post.readTime}
-
-
- {post.excerpt}
-
-
-
-
-
-
-
-
- (
-
- {children}
-
- ),
- h3: ({ children }) => (
-
- {children}
-
- ),
- p: ({ children }) => (
-
- {children}
-
- ),
- li: ({ children }) => (
- {children}
- ),
- blockquote: ({ children }) => (
-
- {children}
-
- ),
- table: ({ children }) => (
-
- ),
- thead: ({ children }) => {children},
- tr: ({ children }) => {children}
,
- th: ({ children }) => (
- {children} |
- ),
- td: ({ children }) => (
- {children} |
- ),
- code: ({ className, children }) => {
- const match = /language-(\w+)/.exec(className ?? "");
- const codeText = String(children).replace(/\n$/, "");
- const language = match?.[1] ?? "";
-
- if (!match) {
- return (
-
- {children}
-
- );
- }
-
- if (language === "mermaid") {
- return ;
- }
-
- return (
-
- {codeText}
-
- );
- },
- }}
+
+
+
- {post.markdown}
-
-
-
-
+ {"<- Back to blog"}
+
+
+
+ {post.category}
+
+ {post.title}
+
+
+ {post.author} - {post.date} - {post.readTime}
+
+
+ {post.excerpt}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Comments
+
+
+
+
+ {comments.map((item) => (
+
+
+
+
+
+ {item.author.slice(0, 2).toUpperCase()}
+
+
+
+
+
+ {item.author}
+
+
+ {item.date}
+
+
+
+ {item.content}
+
+
+
+
+
+
+ {item.replies.length > 0 ? (
+
+ {item.replies.map((reply) => (
+
+
+
+
+
+ {reply.author.slice(0, 2).toUpperCase()}
+
+
+
+
+
+ {reply.author}
+
+
+ {reply.date}
+
+
+
+ {reply.content}
+
+
+
+
+ ))}
+
+ ) : null}
+
+
+
+ ))}
+
+
+ {!githubAuthed ? (
+
+
+ You need to sign in with GitHub before posting comments.
+
+
+
+ ) : null}
+
+ {replyTo ? (
+
+
+
+ Replying to {replyTo.author}
+
+
+
+
+ ) : null}
+
+
+
+
+
+
+
+
+ (
+
+ {children}
+
+ ),
+ h3: ({ children }) => (
+
+ {children}
+
+ ),
+ p: ({ children }) => (
+
+ {children}
+
+ ),
+ li: ({ children }) => (
+ {children}
+ ),
+ blockquote: ({ children }) => (
+
+ {children}
+
+ ),
+ table: ({ children }) => (
+
+ ),
+ thead: ({ children }) => {children},
+ tr: ({ children }) => {children}
,
+ th: ({ children }) => (
+ {children} |
+ ),
+ td: ({ children }) => {children} | ,
+ code: ({ className, children }) => {
+ const match = /language-(\w+)/.exec(className ?? "");
+ const codeText = String(children).replace(/\n$/, "");
+ const language = match?.[1] ?? "";
+
+ if (!match) {
+ return (
+
+ {children}
+
+ );
+ }
+
+ if (language === "mermaid") {
+ return ;
+ }
+
+ return (
+
+ {codeText}
+
+ );
+ },
+ }}
+ >
+ {post.markdown}
+
+
+
+
+ >
);
}
diff --git a/data/blog-engagement.ts b/data/blog-engagement.ts
new file mode 100644
index 0000000..a69acfc
--- /dev/null
+++ b/data/blog-engagement.ts
@@ -0,0 +1,73 @@
+export type BlogReply = {
+ id: string;
+ author: string;
+ avatar: string;
+ date: string;
+ content: string;
+ likes: number;
+};
+
+export type BlogComment = {
+ id: string;
+ author: string;
+ avatar: string;
+ date: string;
+ content: string;
+ likes: number;
+ replies: BlogReply[];
+};
+
+export type BlogEngagement = {
+ slug: string;
+ likes: number;
+ comments: BlogComment[];
+};
+
+export const BLOG_ENGAGEMENT: BlogEngagement[] = [
+ {
+ slug: "building-minimal-design-systems",
+ likes: 184,
+ comments: [
+ {
+ id: "comment-1",
+ author: "Merve K.",
+ avatar: "/avatars/berat.png",
+ date: "2 days ago",
+ content:
+ "The constraints-first point is very practical. We had the same issue with variant explosion.",
+ likes: 12,
+ replies: [
+ {
+ id: "reply-1",
+ author: "Poyraz Avsever",
+ avatar: "/logo/logo.jpeg",
+ date: "1 day ago",
+ content:
+ "Exactly. Once defaults are strong, most edge cases disappear without extra variants.",
+ likes: 6,
+ },
+ ],
+ },
+ {
+ id: "comment-2",
+ author: "Ahmet Y.",
+ avatar: "/avatars/ali.png",
+ date: "5 days ago",
+ content:
+ "Could you also share a checklist for documenting component states in PR reviews?",
+ likes: 8,
+ replies: [],
+ },
+ ],
+ },
+];
+
+const EMPTY_ENGAGEMENT: BlogEngagement = {
+ slug: "default",
+ likes: 0,
+ comments: [],
+};
+
+export function getBlogEngagementBySlug(slug: string): BlogEngagement {
+ return BLOG_ENGAGEMENT.find((item) => item.slug === slug) ?? EMPTY_ENGAGEMENT;
+}