-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 통합 blog entity 구조 및 SSG 최적화 #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kickbelldev
merged 14 commits into
main
from
feat/entity-optimization-and-category-system
Jul 17, 2025
Merged
feat: 통합 blog entity 구조 및 SSG 최적화 #10
kickbelldev
merged 14 commits into
main
from
feat/entity-optimization-and-category-system
Jul 17, 2025
Conversation
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
- getPostBySlug 함수를 캐시된 allPosts에서 조회하도록 변경 - findPostPathBySlug 함수 제거하여 중복 파일 스캔 방지 - getAllMdxFiles, getPostByFilePath 함수 추가로 재귀적 MDX 파일 처리 개선 - SSG 빌드 시 파일을 한 번만 읽도록 최적화 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 태그 그래프를 모듈 레벨에서 캐시하여 중복 생성 방지 - 태그 클러스터 계산 결과 캐싱으로 성능 개선 - findRelatedPostsByTagsOptimized 함수 추가로 캐시된 클러스터 활용 - getTagGraph, getTagRelationships, getTagClusters 함수 동기화로 성능 향상 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- parsePostData 함수에 카테고리 추론 로직 추가 - extractCategoryFromPath 함수로 파일 경로에서 카테고리 자동 추출 - CategoryId 타입 추가로 타입 안정성 향상 - parsePostData, extractCategoryFromPath 관련 테스트 케이스 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 프로젝트 구조에 graphology 라이브러리 추가 - 디렉토리 구조를 카테고리 기반 라우팅으로 업데이트 - 새로운 엔티티(categories) 및 컴포넌트 구조 반영 - MDX 컴포넌트 및 테스트 디렉토리 추가 - GEMINI.md 문서 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 카테고리 도메인 로직 및 타입 정의 - getAllCategories, getCategoryById 등 핵심 함수 구현 - 카테고리별 포스트 필터링 및 통계 기능 추가 - 카테고리 유효성 검증 로직 포함 - 테스트 케이스 작성으로 안정성 확보 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- contents/ 루트에 카테고리별 디렉토리 구조 생성 - src/contents/에서 카테고리별로 포스트 재조직 - dev, life 카테고리용 category.json 설정 파일 추가 - 기존 테스트 포스트들을 적절한 카테고리로 이동 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- NavLink 컴포넌트 추가로 재사용 가능한 네비게이션 링크 구현 - Header 컴포넌트를 카테고리 기반 네비게이션으로 업데이트 - 동적 카테고리 메뉴 생성으로 확장 가능한 구조 제공 - 카테고리별 포스트 개수 표시 지원 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- [category]/[slug] 동적 라우팅으로 카테고리별 포스트 상세 페이지 구현 - [category] 페이지로 카테고리별 포스트 목록 제공 - 기존 posts 컴포넌트들을 카테고리 기반으로 마이그레이션 - PostContent, PostHeader, PostNavigation 등 재사용 가능한 컴포넌트 - CategoryBadge, CategoryList 등 카테고리 전용 컴포넌트 추가 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- extractCategoryFromPath에서 하드코딩된 카테고리 제한 제거 - 모든 서브디렉토리를 유효한 카테고리로 인식하도록 변경 - 파일 경로 구조 검증 로직 개선 (contents/category/file.mdx 구조 필수) - 관련 테스트 케이스 업데이트 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 한글 파일명을 영문으로 변경하여 URL 호환성 개선 - 컨텐츠를 dev/life 카테고리별로 적절히 분류 - 파일 위치 최적화로 라우팅 구조와 일치시킴 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- posts, categories, tags 개별 entity 삭제 - 복잡한 상호 의존성 문제 해결을 위한 구조 정리 - 통합된 blog entity로 리팩토링 준비 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- 단일 책임 원칙을 따르는 통합 blog entity 생성 - 모듈 레벨 캐싱으로 SSG 최적화 (빌드 타임에 한 번만 파일 읽기) - logic/ 하위 디렉토리로 관심사별 분리 (posts, categories, tags) - 통합된 types.ts로 타입 일관성 보장 - 공개 API를 index.ts로 일원화 주요 개선사항: - getAllPosts, getAllCategories 등 모든 데이터 모듈 레벨 캐싱 - 태그 그래프 및 클러스터 사전 계산 - 상호 의존성 문제 해결 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- @/entities/posts, @/entities/categories, @/entities/tags → @/entities/blog로 모든 임포트 경로 변경 - 타입 정의 통합으로 일관성 개선 - Category 타입에 color, icon 속성 추가 (CategoryBadge 호환성) - 사용하지 않는 임포트 제거 및 최적화 - 모든 컴포넌트의 TypeScript 에러 해결 변경된 컴포넌트: - Header, CategoryBadge, CategoryList, CategoryPage - PostContent, PostFooter, PostHeader, PostNavigation - RelatedPosts, RelatedPostItem 등 모든 포스트 관련 컴포넌트 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Git 훅 설정 최적화 - 코드 품질 검사 단계 개선 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
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.
Summary
주요 변경사항
🏗️ Entity 아키텍처 개선
src/entities/blog/하나로 통합getAllPosts(),getAllCategories()등 빌드 타임에 한 번만 실행logic/posts.ts,logic/categories.ts,logic/tags.ts로 논리적 분리types.ts로 일원화⚡ 성능 최적화
🔧 코드 품질 개선
@/entities/blog사용📁 컨텐츠 관리 개선
기술적 세부사항
Before (분리된 구조)
After (통합 구조)
캐싱 최적화 예시
Commit History
Test Plan
pnpm type)pnpm biome:check)Breaking Changes
없음. 기존 API와 동일한 인터페이스 유지.
🤖 Generated with Claude Code