Skip to content

Conversation

@wo-o29
Copy link
Contributor

@wo-o29 wo-o29 commented Oct 16, 2025

📝 Key Changes

Fixes #495 , #576

This PR removes the <base> tag injection from the transformHead function in shared.mts that was causing relative links to break in production builds.

Problem:
When clicking relative links like ./examples/submit-button.html from /code-quality/code/, the browser incorrectly navigates to /code-quality/examples/submit-button.html instead of the expected /code-quality/code/examples/submit-button.html.

Root Cause:
The HTML <base> tag forces all relative paths to resolve from /code-quality/, overriding the current page's path. This conflicts with VitePress's client-side routing, which already handles base path configuration correctly.

Solution:
Remove the manual <base> tag injection from transformHead. VitePress's built-in base configuration is sufficient for proper routing without the need for an explicit HTML <base> tag.

🖼️ Before and After Comparison

Before After
전 후

@vercel
Copy link

vercel bot commented Oct 16, 2025

@wo-o29 is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

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.

Code Quality > 좋은 코드를 위한 4가지 기준 페이지 내부의 링크 깨짐

1 participant