refactor: replace anchor tags with Next.js Link components - #5
Merged
Conversation
The landing page linked to the docs with plain <a href="/docs"> tags.
Next.js only prepends basePath ("/tarjan" on GitHub Pages) to next/link
<Link>, not to raw anchors, so "Get started", the nav "Docs" link, and
"Read the docs" all pointed at /docs and 404'd on the deployed site.
Switch those three internal links to <Link>; the in-page #features anchor
and external GitHub links stay as <a>. Verified a production build with
PAGES_BASE_PATH=/tarjan emits href="/tarjan/docs/" for all three.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MoUvg2Lio7NF4dAr1bsUR2
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.
Summary
Replace internal anchor tags (
<a>elements) with Next.jsLinkcomponents for internal navigation routes. This improves performance by enabling client-side navigation and prefetching for links to/docspages.Three internal navigation links are updated:
External links (GitHub) remain as anchor tags since they navigate outside the application.
Type of change
fix)feat)refactor/chore)docs)ci/build)Checklist
make checkpasses locally (fmt, vet, lint, race tests + coverage gate).CHANGELOG.mdunder## [Unreleased](if user-visible).Notes for reviewers
This is a straightforward refactor that improves the user experience by leveraging Next.js's built-in Link component for internal navigation. The change maintains the same styling and functionality while enabling client-side transitions and automatic prefetching of linked pages.
https://claude.ai/code/session_01MoUvg2Lio7NF4dAr1bsUR2