feat(site): 사이트를 minjun.kim/mdwire 아래로 옮긴다 - #107
Merged
Merged
Conversation
프로젝트 사이트를 개인 사이트의 하위 경로로 모으기로 한 결정에 따라 서빙 주소를 `mdwire.minjun.dev` 에서 `minjun.kim/mdwire/` 로 바꾼다. 워커와 Workers Builds 배포는 그대로고 바뀌는 건 연결이다. - Astro `site` · `base: /mdwire` · `outDir: dist/mdwire`. 정적 자산은 요청 경로 그대로 찾으므로 산출물이 그 아래에 있어야 하고, `_headers` 만 빌드 끝에 `dist/` 로 올린다. - 레이아웃 · 사이드바 · 이전 다음 링크가 `Astro.url.pathname` 에서 base 를 떼고 읽는다(`src/urls.ts`). 손으로 쓴 절대 경로(favicon · og · sitemap · llms.txt)에는 base 를 붙인다. MDX 본문의 사이트 안 링크는 `/mdwire/…` 로 적는다 — Astro 7 의 기본 마크다운 처리기는 플러그인으로 붙여 줄 길이 없다. - sitemap · 마크다운 사본 · llms.txt · llms-full.txt 의 주소를 새 주소로. `robots.txt` 는 하위 경로에서 읽히지 않아 뺀다. - wrangler: `minjun.kim/mdwire` · `minjun.kim/mdwire/*` 라우트. 옛 Custom Domain 은 붙여 둔다 — 존의 Redirect Rule 이 301 을 보내려면 호스트가 살아 있어야 한다. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
두 주소를 합치는 건 나중 일로 미뤄졌다. 옛 호스트의 요청 경로 앞에 /mdwire 를 붙이는 건 minjun.dev 존의 URL Rewrite 규칙이 한다 — 설명과 주석만 그에 맞춘다. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
minjun0219
marked this pull request as ready for review
October 4, 2026 00:46
This was referenced Oct 4, 2026
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.
사이트의 정본 주소를
mdwire.minjun.dev에서minjun.kim/mdwire/로 옮긴다 — 프로젝트 사이트를 개인 사이트의 하위 경로로 모으는 결정. 워커와 Workers Builds 배포는 그대로고 바뀌는 건 연결(라우트)과 산출물 위치다. 옛 주소도 당분간 같은 빌드를 그대로 서빙한다(합치는 건 나중). 저장소 전반의 링크 갱신(README · llms 스킬 · 매니페스트)은 이 PR 이 배포된 뒤 따로 낸다.변경 사항
산출물이
dist/mdwire/아래에 나온다정적 자산은 요청 경로 그대로 파일을 찾으므로
base만으로는 안 되고outDir도 내려야 한다._headers는 자산 루트에서만 읽히니 빌드 끝에 한 단 올린다 — 여기가 이 PR 에서 가장 "틀리면 전부 404" 인 곳이다.wrangler dev로/mdwire/· 404 · 헤더까지 확인했다.site/astro.config.mjs:88
라우트 둘 + 옛 Custom Domain 은 병행 서빙
minjun.kim/mdwire*하나는/mdwire-x까지 잡아서 둘로 썼다. 옛 호스트는 떼지 않고 같은 빌드를 서빙한다 — 파일이/mdwire/…아래에 있으니minjun.dev존의 URL Rewrite 규칙(대시보드, 이 PR 밖)이 그 호스트의 요청 경로 앞에/mdwire를 붙인다. 첫 프로덕션 배포에서 빌드 토큰에minjun.kim존의 Workers Routes 권한이 없으면 여기서 실패한다.site/wrangler.jsonc:15
MDX 본문 링크에
/mdwire/를 직접 적었다Astro 7 의 기본 마크다운 처리기(Sätteri)는 rehype 플러그인을 돌리지 않아 자동으로 붙일 길이 없었다. 처리기 패키지를 더하는 대신 59 곳을 바꿨다(sed). 레이아웃 쪽은
src/urls.ts의withBase·stripBase를 거친다.site/src/urls.ts:1
검증
pnpm run check·pnpm run build통과. 빌드 HTML 전체에/mdwire/가 아닌 루트 href/src 는 0.wrangler dev스모크:/mdwire/200,/mdwire→ 307/mdwire/,/mdwire/nope/는 404 페이지, 사본text/markdown; charset=utf-8,_astroimmutable. 확인 못 한 것: 실제minjun.kim존 라우트 생성(빌드 토큰 권한), 옛 호스트의 URL Rewrite(대시보드에서 넣은 뒤), PR 프리뷰 — 프리뷰 배포는 Previews 설정의 옛 토큰 문제로 지금 실패한다(#106 과 같은 원인, 이 PR 과 무관).🤖 Generated with Claude Code