Skip to content

fix(blog): heading anchor와 글 문체 정리#105

Merged
dev-wooyeon merged 4 commits into
masterfrom
codex/blog-heading-toc-content-polish
May 8, 2026
Merged

fix(blog): heading anchor와 글 문체 정리#105
dev-wooyeon merged 4 commits into
masterfrom
codex/blog-heading-toc-content-polish

Conversation

@dev-wooyeon

Copy link
Copy Markdown
Owner

변경 내용

  • MDX heading text 정규화 helper를 blog/model/heading.ts로 분리
  • markdown parser와 MDX heading component가 같은 heading id 생성 규칙을 사용하도록 정리
  • code fence 내부 heading을 TOC에서 제외하고, bold/link/inline code 포함 heading을 정규화
  • TOC를 native hash link 기반으로 변경하고 heading scroll margin 추가
  • 기존 CTR/맥북 글 제목과 문체 정리

의도

  • 렌더링된 heading id와 TOC parser의 id가 달라지는 문제를 줄이기 위함
  • PR 103에서 필요한 작업만 PR 104 이후의 루트 모듈 구조에 맞춰 다시 반영하기 위함
  • 새 맥북 개발환경 private draft와 lockfile metadata 정리는 이번 PR 범위에서 제외

영향 범위

  • 블로그 MDX heading 렌더링과 TOC/hash anchor 동작
  • posts/맥북에어-m1-생활
  • posts/실시간-CTR-파이프라인-구축기/meta.json

검증

  • npm run lint
  • npm run lint:css:syntax
  • npx vitest run blog/services/markdown-parser.test.ts blog/ui/components/TableOfContents.test.tsx blog/ui/mdx/components.test.tsx blog/services/publication-policy.test.ts
  • git diff --check master..HEAD
  • npm run build

체크리스트

  • 작업 단위 브랜치(codex/<task>)에서 진행함
  • 커밋 메시지 규칙(<type>: <한국어 설명>) 준수
  • PR 103에서 필요한 커밋만 선별 반영함

박은우 and others added 3 commits May 8, 2026 14:15
PR 104 이후 구조에서 cherry-pick한 heading factory가 Next build 타입 검사에서 generic JSX 오류를 냈어요.

동작은 유지하고 React createElement 기반으로 렌더링해 heading tag 타입을 명확히 했어요.
@vercel

vercel Bot commented May 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eunu-log Ready Ready Preview, Comment May 8, 2026 5:30am

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5b049fb808

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

aria-label="이 글의 목차"
>
<div className="h-full overflow-y-auto rounded-[var(--radius-md)] bg-[var(--color-grey-50)] p-4">
<div className="rounded-[var(--radius-md)] bg-[var(--color-grey-50)] p-4">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore scrolling for long TOCs

For longer posts on desktop (I checked existing posts such as posts/블로그-시스템-구축기/index.mdx with 41 headings and posts/알고리즘-시각화/index.mdx with 36), this fixed TOC can extend below the viewport and the lower links become unreachable because the scrollable h-full overflow-y-auto container and bottom constraint were removed. Please keep a viewport-bounded height/max-height with overflow-y-auto so all TOC entries remain accessible.

Useful? React with 👍 / 👎.

긴 블로그 글에서 desktop TOC가 viewport 아래로 넘치면 하단 항목에 접근할 수 없는 문제가 있었어요.

native hash link 동작은 유지하고 TOC 영역에 bottom constraint와 내부 overflow scroll을 복원했어요.
@dev-wooyeon dev-wooyeon merged commit a87be45 into master May 8, 2026
3 checks passed
@dev-wooyeon dev-wooyeon deleted the codex/blog-heading-toc-content-polish branch June 15, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant