Skip to content

Replace anchor tags with Router.Link for client-side navigation#12

Merged
brnrdog merged 1 commit intomainfrom
claude/fix-docs-routing-aKt3Z
Feb 11, 2026
Merged

Replace anchor tags with Router.Link for client-side navigation#12
brnrdog merged 1 commit intomainfrom
claude/fix-docs-routing-aKt3Z

Conversation

@brnrdog
Copy link
Owner

@brnrdog brnrdog commented Feb 11, 2026

Summary

This PR updates the documentation website to use the Router.Link component instead of standard HTML anchor tags (<a>) for internal navigation. This enables client-side routing instead of full page reloads, improving the user experience. Additionally, the Router is initialized with a base path to support deployment in a subdirectory.

Key Changes

  • PageNavigation.res: Replaced <a> tags with <Router.Link> for previous/next page navigation links
  • App.res: Replaced <a> tags with <Router.Link> for logo and header navigation links
  • Breadcrumbs.res: Replaced <a> tags with <Router.Link> for breadcrumb navigation links
  • Main.res: Updated Router.init() call to include ~basePath="/rescript-signals" parameter for proper routing in subdirectory deployment

Implementation Details

  • All href attributes were converted to to attributes to match the Router.Link API
  • Styling and other attributes were preserved during the conversion
  • The base path configuration allows the documentation site to be deployed at a subdirectory URL while maintaining correct routing behavior

https://claude.ai/code/session_01Rjq6HzjqRpM3dy846r1Vmj

Set Router.init basePath to "/rescript-signals" so the router correctly
strips and adds the base path for GitHub Pages deployment. Convert raw
<a href> links to Router.Link in App, Breadcrumbs, and PageNavigation
so all internal navigation goes through the router and gets the base
path prefix automatically.
@brnrdog brnrdog merged commit 7b7f4ae into main Feb 11, 2026
2 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.

1 participant