Skip to content

content: True Log 프로젝트 소개 글 추가 (고정) - #74

Merged
CoBool merged 2 commits into
mainfrom
claude/true-log-project-introduction
Aug 15, 2026
Merged

content: True Log 프로젝트 소개 글 추가 (고정)#74
CoBool merged 2 commits into
mainfrom
claude/true-log-project-introduction

Conversation

@CoBool

@CoBool CoBool commented Aug 11, 2026

Copy link
Copy Markdown
Owner

변경 내용

  • content/posts/true-log-project-introduction.md 추가 — README/CONTENT.md 내용을 바탕으로 True Log가 무엇이고 어떻게 구성돼 있는지 설명하는 글. pinned: true로 홈 최상단에 고정.
  • tests/lists-taxonomy.test.tsx, tests/post-detail.test.tsx, tests/scaffold.test.ts를 실제 content/posts 데이터에서 슬러그·제목·날짜·카테고리·태그·TOC 노출 여부를 동적으로 끌어오도록 다시 씀. 더 이상 특정 글 하나를 하드코딩해 참조하지 않는다.

변경 이유

지금까지 True Log에는 구현 과정을 다루는 글만 있고, 프로젝트 자체를 소개하는 글이 없었다. 처음 방문하는 독자가 이 블로그가 어떤 성격인지(Markdown 파이프라인이 프레임워크와 분리돼 있다는 점, 정적 export라는 점, 다이어그램·sanitize 처리 방식 등) 바로 알 수 있도록 고정 글로 추가했다.

새 글을 추가하면서 카테고리·태그 개수가 1개에서 2개로 바뀌었는데, 관련 테스트들이 "engineering", "markdown", "1개"처럼 특정 글의 값을 그대로 하드코딩하고 있어서 그때마다 테스트를 손봐야 했다. 글을 하나 쓸 때마다 테스트 유지보수가 뒤따르는 구조는 이상하다고 판단해, getAllPosts()/getCategoryIndex()/getTagIndex()가 실제로 돌려주는 값을 기준으로 기대값을 계산하도록 바꿨다. 임시로 글 하나를 더 추가해 봤을 때 이 파일들을 건드리지 않고도 테스트가 그대로 통과하는 것으로 확인했다.

검증

  • pnpm lint 통과
  • pnpm typecheck 통과
  • pnpm test — 211개 전부 통과
  • pnpm build 통과, 홈 렌더 결과에서 고정 글이 최상단에 노출되는 것 확인
  • 임시 fixture 글을 추가한 뒤 테스트 파일을 수정하지 않고 pnpm test가 그대로 통과하는지 검증 (디커플링 확인)

🤖 Generated with Claude Code

CoBool and others added 2 commits August 11, 2026 17:23
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…hardcoding

Given post-fixture (#72, #73) fallout, tests/lists-taxonomy.test.tsx,
tests/post-detail.test.tsx, and tests/scaffold.test.ts hardcoded a
specific slug, title, date, category, and tag pulled straight from
content/posts. Every new or renamed post forced a matching test edit.

Derive the expected slug/title/date/category/tag/TOC-visibility from
getAllPosts()/getCategoryIndex()/getTagIndex() at test time instead, so
writing a post no longer requires touching these files. Verified by
temporarily adding a scratch post and confirming the suite still passes
unmodified.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@CoBool
CoBool merged commit 1fc263d into main Aug 15, 2026
1 check passed
@CoBool
CoBool deleted the claude/true-log-project-introduction branch August 15, 2026 10:39
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