Next.js κΈ°λ°μ λΈλ‘κ·Έ νλ«νΌμΌλ‘, Notionμ CMSλ‘ νμ©νμ¬ μ½ν μΈ λ₯Ό κ΄λ¦¬ν©λλ€.
- π Notion CMS μ°λ: Notion λ°μ΄ν°λ² μ΄μ€λ₯Ό ν΅ν μ½ν μΈ κ΄λ¦¬
- π¨ Tailwind CSS v4: λͺ¨λν μ€νμΌλ§
- π§ TypeScript: νμ μμ μ±
- π± λ°μν λμμΈ: λͺ¨λ°μΌ-νΌμ€νΈ μ κ·Ό
- π λ€ν¬λͺ¨λ: λΌμ΄νΈ/λ€ν¬ ν λ§ μ§μ
- π§© μ»΄ν¬λνΈ μν€ν μ²: Atomic Design ν¨ν΄
- π Storybook: UI μ»΄ν¬λνΈ λ¬Έμν
- π§ͺ Vitest: λ¨μ ν μ€νΈ
# μμ‘΄μ± μ€μΉ
bun install
# κ°λ° μλ² μμ
bun run devλΈλΌμ°μ μμ http://localhost:3000μ μ΄μ΄ κ²°κ³Όλ₯Ό νμΈνμΈμ.
.env.local νμΌμ μμ±νκ³ λ€μ νκ²½λ³μλ₯Ό μ€μ νμΈμ:
# Notion API μ€μ
NOTION_API_KEY=your_notion_api_key
NOTION_DATABASE_ID=your_notion_database_id
# Giscus λκΈ μμ€ν
(μ νμ¬ν) - ν΄λΌμ΄μΈνΈμμ μ¬μ©νλ―λ‘ NEXT_PUBLIC_ μ λμ¬ νμ
NEXT_PUBLIC_GISCUS_REPO=your_giscus_repo
NEXT_PUBLIC_GISCUS_REPO_ID=your_giscus_repo_id
NEXT_PUBLIC_GISCUS_CATEGORY_ID=your_giscus_category_id
# Google Analytics (GA4) μ€μ (μ νμ¬ν)
NEXT_PUBLIC_GA_ID=your_google_analytics_id# κ°λ° μλ² (Turbopack)
bun run dev
# νλ‘λμ
λΉλ
bun run build
# μ μ μ¬μ΄νΈ λΉλ (GitHub Pagesμ©)
bun run export
# ν
μ€νΈ μ€ν
bun run test
# λ¦°ν
bun run lint
# ν¬λ§·ν
bun run format
# μ€ν 리λΆ
bun run storybook- ESLint: μ½λ μ€νμΌ κ²μ¬
- Prettier: μ½λ ν¬λ§·ν
- Husky: Git hooks
- lint-staged: μ€ν μ΄μ§λ νμΌ λ¦°ν
src/
βββ app/ # Next.js App Router
βββ components/ # React μ»΄ν¬λνΈ
β βββ ui/ # μ¬μ¬μ© κ°λ₯ν UI μ»΄ν¬λνΈ
β βββ layout/ # λ μ΄μμ μ»΄ν¬λνΈ
β βββ sections/ # νμ΄μ§ μΉμ
β βββ templates/ # νμ΄μ§ ν
νλ¦Ώ
βββ libs/ # μΈλΆ λΌμ΄λΈλ¬λ¦¬ μ€μ
βββ store/ # Zustand μν κ΄λ¦¬
βββ types/ # TypeScript νμ
μ μ
βββ utils/ # μ νΈλ¦¬ν° ν¨μ
- UI: λ¨μΌ κΈ°λ₯ μ¬μ¬μ© μ»΄ν¬λνΈ (
Button,Typography) - Sections: νΉμ νμ΄μ§μ λ μ΄μμ λ¨μ (
BlogPosts,RelatedPosts) - Templates: νμ΄μ§ λ 벨 λ μ΄μμ μ»΄ν¬λνΈ
- Layout: κ³΅ν΅ μ¬μ΄νΈ λ μ΄μμ (
Header,Footer)
μ΄ νλ‘μ νΈλ GitHub Actionsλ₯Ό ν΅ν΄ μλμΌλ‘ GitHub Pagesμ λ°°ν¬λ©λλ€.
- Repository Settings β Pages β Sourceλ₯Ό
GitHub Actionsλ‘ μ€μ - Repository Secretsμ νκ²½λ³μ μΆκ°:
NOTION_API_KEY: Notion API ν€NOTION_DATABASE_ID: Notion λ°μ΄ν°λ² μ΄μ€ IDNEXT_PUBLIC_GISCUS_REPO: Giscus λκΈ λ ν¬μ§ν 리 (μ νμ¬ν)NEXT_PUBLIC_GISCUS_REPO_ID: Giscus λ ν¬μ§ν 리 ID (μ νμ¬ν)NEXT_PUBLIC_GISCUS_CATEGORY_ID: Giscus μΉ΄ν κ³ λ¦¬ ID (μ νμ¬ν)NEXT_PUBLIC_GA_ID: Google Analytics (GA4) μΆμ ID (μ νμ¬ν)
mainλΈλμΉμ pushνλ©΄ μλ λ°°ν¬
μμΈν λ°°ν¬ κ°μ΄λλ DEPLOYMENT.mdλ₯Ό μ°Έκ³ νμΈμ.
# μ μ μ¬μ΄νΈ λΉλ
bun run export
# λΉλ κ²°κ³Ό νμΈ
ls -la out/# λ¨μ ν
μ€νΈ μ€ν
bun run test:unit:run
# ν
μ€νΈ 컀λ²λ¦¬μ§ νμΈ
open coverage/index.html- λ°°ν¬ κ°μ΄λ
- Storybook - μ»΄ν¬λνΈ λ¬Έμ
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
μ΄ νλ‘μ νΈλ MIT λΌμ΄μ μ€ νμ μμ΅λλ€.