Skip to content

feat: MDX 파이프라인 구성 (#1018)#5

Open
hyoseong1994 wants to merge 2 commits into
mainfrom
1018-mdx-pipeline
Open

feat: MDX 파이프라인 구성 (#1018)#5
hyoseong1994 wants to merge 2 commits into
mainfrom
1018-mdx-pipeline

Conversation

@hyoseong1994
Copy link
Copy Markdown
Collaborator

@hyoseong1994 hyoseong1994 commented May 8, 2026

MDX 기반 문서 콘텐츠를 Vite에서 렌더링할 수 있도록 파이프라인을 구성합니다. (closes #1018)

Stacked on #6: 이 PR의 base는 refactor/section-layout입니다. #6이 먼저 머지되면 자동으로 main 기준으로 정리됩니다.

  • @mdx-js/rollup Vite 플러그인과 remark/rehype 체인 설정
    (frontmatter, GFM, heading slug)
  • rehype-pretty-code + shiki(github-light/dark)로 코드 하이라이팅
  • 코드 블록에 Copy 버튼 (복사 성공 시 check 아이콘)
  • .prose 스코프의 GitHub 스타일 마크다운 타이포그래피
  • frontmatter를 named export로 추출 (export const frontmatter)
  • *.mdx 모듈 타입 및 프로젝트 전용 Frontmatter 타입
  • import.meta.glob 기반 문서 로더, BlogPage, /blog/:slug 임시 라우팅
  • 링크 텍스트/href가 video 확장자면 <video>로 렌더 (GitHub과 동일한 업로드 링크 처리 방식)

라우터 도입 및 라우트별 정적 HTML 사전 렌더링은 #1023에서 다룰 예정이라, 이번 PR에서는 파이프라인 검증용 최소 라우팅만 포함했습니다.

테스팅

  • dev 서버에서 src/content/docs/getting-started.mdx의 변환 결과 확인

체크 리스트

  • 코드 리뷰를 요청하기 전에 반드시 CI가 통과하는지 확인해주세요.

@hyoseong1994 hyoseong1994 changed the base branch from main to refactor/section-layout May 8, 2026 05:25
@hyoseong1994 hyoseong1994 force-pushed the 1018-mdx-pipeline branch 2 times, most recently from 8e36602 to 384a475 Compare May 8, 2026 07:31
hyoseong1994 and others added 2 commits May 8, 2026 16:34
- @mdx-js/rollup Vite 플러그인 + frontmatter/GFM/heading slug 체인
- remark-mdx-frontmatter로 export const frontmatter 추출
- rehype-pretty-code + shiki(github-light/dark)로 코드 하이라이팅
- 코드 블록 Copy 버튼 (복사 성공 시 check 아이콘)
- .prose 스코프 GitHub 스타일 마크다운 타이포그래피
- content/lib/createFinder로 glob 결과를 slug 조회 가능한 형태로 가공
- content/loaders/blog에서 import.meta.glob으로 .mdx 수집
- Frontmatter(title/description/date/author) 타입과 *.mdx 모듈 선언 추가
- /blog/:slug 임시 라우팅과 BlogPage, 샘플 글 추가

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 링크 텍스트 또는 href에 video 확장자가 있으면 <video>로 치환
  (GitHub의 업로드 링크 처리 방식과 동일)
- MDX <a> 오버라이드로 비디오와 일반 링크를 단일 경로에서 처리

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@hyoseong1994 hyoseong1994 marked this pull request as ready for review May 8, 2026 07:43
@hyoseong1994 hyoseong1994 requested a review from a team as a code owner May 8, 2026 07:43
Base automatically changed from refactor/section-layout to main May 10, 2026 23:43
@hyoseong1994 hyoseong1994 linked an issue May 11, 2026 that may be closed by this pull request
5 tasks
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.

MDX 파이프라인 구성

1 participant