Skip to content

Commit fc87eaf

Browse files
author
Minseo Kim
committed
chore: about page - move badge/button to component and style
1 parent 9edcb1b commit fc87eaf

6 files changed

Lines changed: 478 additions & 36 deletions

File tree

posts/about.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: "About"
3+
date: "2026-02-13"
4+
tags:
5+
- "about"
6+
category:
7+
- "about"
8+
summary: "About this site and author"
9+
status: "Public"
10+
type: "Page"
11+
slug: "about"
12+
---
13+
14+
15+
Daily
16+
17+
# hello!
18+
19+
> 💡 This blog is built from Markdown posts and synced assets. If you are
20+
> interested, check out the original project:
21+
> https://github.com/morethanmin/morethan-log
22+
23+
Hello, I am Minseo Kim. This is a tech blog where I share what I learn as an
24+
MS Solution Engineer Intern, focusing on Microsoft 365 and Copilot Studio.
25+
If there is anything wrong or if you have any questions, please feel free to
26+
contact me by email.
27+
28+
29+
[View Resume](https://daram62.github.io/MS_Tech_Blog)
30+
31+
## Contact
32+
33+
- Email: ludia0602@gmail.com
34+
- GitHub: https://github.com/daram62
35+
- LinkedIn: https://www.linkedin.com/in/minseo-ludia
36+

site.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ const CONFIG = {
1212
},
1313
projects: [
1414
{
15-
name: `MS Tech Blog`,
15+
name: `Tech Blog`,
1616
href: "https://github.com/daram62/MS_Tech_Blog",
1717
},
1818
],
1919
// blog setting (required)
2020
blog: {
21-
title: "MS Tech Blog",
22-
description: "welcome to MS Tech Blog!",
21+
title: "Tech Blog",
22+
description: "welcome to Minseo's Tech Blog!",
2323
scheme: "dark", // 'light' | 'dark' | 'system'
2424
},
2525

src/libs/utils/markdown.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
export type HeadingItem = {
2+
id: string
3+
text: string
4+
level: number
5+
}
6+
7+
export const slugifyHeading = (value: string) => {
8+
return value
9+
.toLowerCase()
10+
.trim()
11+
.replace(/[\s]+/g, "-")
12+
.replace(/[^a-z0-9\-]/g, "")
13+
}
14+
15+
const stripMarkdown = (value: string) => {
16+
return value
17+
.replace(/!\[[^\]]*\]\([^)]*\)/g, "")
18+
.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1")
19+
.replace(/[`*_~]/g, "")
20+
.replace(/<[^>]+>/g, "")
21+
.trim()
22+
}
23+
24+
export const parseHeadings = (content: string, levels: number[]) => {
25+
const allowed = new Set(levels)
26+
const lines = content.split(/\r?\n/)
27+
const counts = new Map<string, number>()
28+
const headings: HeadingItem[] = []
29+
30+
for (const line of lines) {
31+
const match = /^(#{1,6})\s+(.+)$/.exec(line)
32+
if (!match) continue
33+
34+
const level = match[1].length
35+
if (!allowed.has(level)) continue
36+
37+
const rawText = match[2].replace(/\s+#+\s*$/, "")
38+
const text = stripMarkdown(rawText)
39+
const base = slugifyHeading(text)
40+
if (!base) continue
41+
42+
const count = counts.get(base) ?? 0
43+
counts.set(base, count + 1)
44+
45+
const id = count === 0 ? base : `${base}-${count}`
46+
headings.push({ id, text, level })
47+
}
48+
49+
return headings
50+
}
Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,88 @@
11
import React from "react"
22
import styled from "@emotion/styled"
33
import MarkdownRenderer from "../components/MarkdownRenderer"
4+
import { useMemo } from "react"
45
import usePostQuery from "src/hooks/usePostQuery"
56
type Props = {}
67

78
const PageDetail: React.FC<Props> = () => {
89
const data = usePostQuery()
910

1011
if (!data) return null
12+
// About 페이지라면 뱃지/버튼을 직접 렌더링
13+
const isAbout = data.slug === "about"
14+
const contentWithoutBadgeAndButton = useMemo(() => {
15+
if (!isAbout) return data.content
16+
// Daily 뱃지와 View Resume 버튼이 있던 줄 제거
17+
return data.content
18+
.replace(/^Daily\s*$/m, "")
19+
.replace(/^\[View Resume\]\(.*\)$/m, "")
20+
.trim()
21+
}, [data.content, isAbout])
22+
1123
return (
1224
<StyledWrapper>
13-
<MarkdownRenderer content={data.content} />
25+
<div className="contentCard">
26+
{isAbout && <Badge>Daily</Badge>}
27+
<MarkdownRenderer content={contentWithoutBadgeAndButton} />
28+
{isAbout && (
29+
<ResumeButton
30+
href="https://daram62.github.io/MS_Tech_Blog"
31+
target="_blank"
32+
rel="noopener noreferrer"
33+
>
34+
View Resume
35+
</ResumeButton>
36+
)}
37+
</div>
1438
</StyledWrapper>
1539
)
1640
}
1741

42+
43+
1844
export default PageDetail
1945

2046
const StyledWrapper = styled.div`
47+
padding: 3rem 1.5rem;
2148
margin: 0 auto;
22-
max-width: 56rem;
49+
max-width: 60rem;
50+
51+
.contentCard {
52+
padding: 3rem 1.5rem;
53+
border-radius: 1.5rem;
54+
background-color: ${({ theme }) =>
55+
theme.scheme === "light" ? "white" : theme.colors.gray4};
56+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
57+
0 2px 4px -1px rgba(0, 0, 0, 0.06);
58+
margin: 0 auto;
59+
max-width: 56rem;
60+
width: 100%;
61+
}
62+
`
63+
64+
const Badge = styled.span`
65+
display: inline-block;
66+
padding: 0.2rem 0.6rem;
67+
border-radius: 999px;
68+
background: #e6f0ff;
69+
color: #1d4ed8;
70+
font-size: 0.75rem;
71+
font-weight: 600;
72+
margin-bottom: 1rem;
73+
`
74+
75+
const ResumeButton = styled.a`
76+
display: inline-block;
77+
margin-top: 0.75rem;
78+
padding: 0.6rem 1rem;
79+
border-radius: 0.75rem;
80+
background: #111827;
81+
color: #fff;
82+
text-decoration: none;
83+
font-weight: 600;
84+
transition: background 0.2s;
85+
&:hover {
86+
background: #374151;
87+
}
2388
`

0 commit comments

Comments
 (0)