Skip to content

Conversation

@junh0328
Copy link
Contributor

@junh0328 junh0328 commented Nov 6, 2025

📝 Key Changes

shared.mts에서 <base href="/code-quality/"> 태그를 제거하여 상대 경로 링크가 올바르게 동작하도록 수정했습니다.

문제 상황:

  • /code-quality/code/ 페이지에서 ./examples/submit-button 링크 클릭 시
  • 예상 경로: /code-quality/code/examples/submit-button.html
  • 실제 이동: /code-quality/examples/submit-button.html (404 에러)

원인 분석:
HTML <base> 태그는 페이지 내 모든 상대 경로의 기준점(base URL)을 변경합니다.

  • <base href="/code-quality/">가 설정되어 있으면
  • 모든 상대 경로(./, ../)가 현재 페이지가 아닌 /code-quality/를 기준으로 해석됩니다
  • 따라서 /code-quality/code/ 에서 ./examples/submit-button
    • 현재 위치 기준: /code-quality/code/ + examples/submit-button
    • base 태그 기준: /code-quality/ + examples/submit-button

해결 방법:
<base> 태그를 제거하여 상대 경로가 현재 페이지 위치를 기준으로 정상 해석되도록 했습니다.

🔄️ Before and After Comparison

Before After
/code-quality/code/ 페이지에서
./examples/submit-button 클릭 시
/code-quality/examples/submit-button.html (404)
/code-quality/code/
페이지에서
./examples/submit-button 클릭 시
/code-quality/code/examples/submit-button.html (✅)

AS-IS

2025-11-06.9.51.46.mov

TO-BE

2025-11-06.9.50.45.mov

Copilot AI review requested due to automatic review settings November 6, 2025 00:52
@vercel
Copy link

vercel bot commented Nov 6, 2025

@junh0328 is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes a redundant HTML <base> tag from the VitePress configuration. The base path /code-quality/ is already properly configured via VitePress's base configuration option, making the manual HTML tag unnecessary and potentially problematic.

  • Removed duplicate <base> tag injection in the transformHead function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@milooy milooy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vercel
Copy link

vercel bot commented Nov 10, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
frontend-fundamentals Error Error Nov 10, 2025 11:18am

@milooy milooy merged commit 5a8b32b into toss:main Nov 10, 2025
8 of 9 checks passed
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.

2 participants