Skip to content

Conversation

@ryuchihoon
Copy link
Contributor

@ryuchihoon ryuchihoon commented Sep 14, 2025

Fixes an issue where anchor links (e.g., webgpu-fundamentals.html#section) in translation pages were incorrectly redirecting to the English version instead of staying within the same language directory.
You can hit the problem from JA/KO translations of webgpu-storage-textures.
They have a link to English page (https://webgpufundamentals.org/webgpu/lessons/webgpu-fundamentals.html#a-run-computations-on-the-gpu ) not their translated page.

The problem was in the isArticleLink() function which didn't properly recognize HTML files with anchors as article links. Now it splits the URL on '#' and checks the base URL.

Before: webgpu-fundamentals.html#anchor -> ../webgpu-fundamentals.html#anchor (English)
After: webgpu-fundamentals.html#anchor -> webgpu-fundamentals.html#anchor (Same language)

🤖 Generated with Claude Code

Fixes an issue where anchor links (e.g., webgpu-fundamentals.html#section)
in translation pages were incorrectly redirecting to the English version
instead of staying within the same language directory.

The problem was in the isArticleLink() function which didn't properly
recognize HTML files with anchors as article links. Now it splits the URL
on '#' and checks the base URL.

Before: webgpu-fundamentals.html#anchor -> ../webgpu-fundamentals.html#anchor (English)
After:  webgpu-fundamentals.html#anchor -> webgpu-fundamentals.html#anchor (Same language)

🤖 Generated with [Claude Code](https://claude.ai/code)
@greggman greggman merged commit 90f2b73 into gfxfundamentals:master Sep 14, 2025
1 check 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