Skip to content

docs: remove /index.html from homepage URL#90

Merged
jpr5 merged 1 commit intoCopilotKit:mainfrom
NathanTarbert:fix/clean-homepage-url
Apr 7, 2026
Merged

docs: remove /index.html from homepage URL#90
jpr5 merged 1 commit intoCopilotKit:mainfrom
NathanTarbert:fix/clean-homepage-url

Conversation

@NathanTarbert
Copy link
Copy Markdown
Contributor

Summary

  • Replace all href="index.html" links with href="/" across 35 doc pages so clicking Home or the logo produces a clean URL without /index.html
  • Add history.replaceState fallback in index.html to silently rewrite /index.html/ for direct visits (bookmarks, search engines, old links)
  • Update sidebar.js current-page detection to still highlight correctly when the path is /

Test plan

  • Visit https://aimock.copilotkit.dev and confirm the URL stays / (no /index.html)
  • Click the logo or "Home" link from any doc page and confirm the URL is /
  • Navigate directly to /index.html and confirm the URL rewrites to /
  • Verify sidebar highlighting still works on the homepage

Replace all href="index.html" links with href="/" across doc pages
so navigating Home produces a clean URL. Add history.replaceState
fallback in index.html for direct visits to /index.html.
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@90

commit: b1450d9

Copy link
Copy Markdown
Contributor

@jpr5 jpr5 left a comment

Choose a reason for hiding this comment

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

PR Review

Mechanical docs-only change — same 2-line substitution (href="index.html"href="/") across 35 HTML pages. Verified all 35 files have the identical pattern.

The three non-mechanical pieces are correct:

  • index.html: history.replaceState rewrites /index.html/ for direct visits. Only fires on exact pathname match, won't affect other pages. Clean.
  • sidebar.js: if (currentPage === "" || currentPage === "/") currentPage = "index.html" — handles the new clean URL so sidebar highlighting still works on homepage. Correct.
  • No source code changes — only docs/ files touched.

Zero findings. LGTM.

🤖 Reviewed with Claude Code

@jpr5 jpr5 merged commit 3bdc79f into CopilotKit:main Apr 7, 2026
11 checks passed
@NathanTarbert NathanTarbert deleted the fix/clean-homepage-url branch April 7, 2026 22:36
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