content: True Log 프로젝트 소개 글 추가 (고정) - #74
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경 내용
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통과, 홈 렌더 결과에서 고정 글이 최상단에 노출되는 것 확인pnpm test가 그대로 통과하는지 검증 (디커플링 확인)🤖 Generated with Claude Code