Skip to content

fix: use trailing-slash links for index pages so sidebar active state works properly - #340

Merged
Carl Kittelberger (icedream) merged 1 commit into
mainfrom
fix/sidebar-active-index
Aug 4, 2026
Merged

fix: use trailing-slash links for index pages so sidebar active state works properly#340
Carl Kittelberger (icedream) merged 1 commit into
mainfrom
fix/sidebar-active-index

Conversation

@icedream

@icedream Carl Kittelberger (icedream) commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Problem

For index pages served at /folder/, the sidebar navigation couldn't mark the entry as active.

Root cause: VitePress serves index.md at the directory's trailing-slash path (/folder/), not at /folder/index. The sidebar links were written as /folder/index, which never matched the current route /folder/, so the active state was never triggered.

Fix

Changed the sidebar link from /token-service/index/token-service/ (and the same for /hathora/). Now the sidebar link matches the actual URL, and the active state works as expected.

Affected sections

  • src/steelshield/token-service/sidebar.json
  • src/multiplayer-servers/hathora/sidebar.json

Testing

  • Build of docs still works

  • In the browser the active indication of pages in the sidebar now works visibly:

    image image

@icedream
Carl Kittelberger (icedream) marked this pull request as draft July 31, 2026 15:02
@icedream
Carl Kittelberger (icedream) marked this pull request as ready for review July 31, 2026 15:03
@icedream
Carl Kittelberger (icedream) requested a review from a team July 31, 2026 15:07
@icedream
Carl Kittelberger (icedream) marked this pull request as draft July 31, 2026 15:18
@icedream
Carl Kittelberger (icedream) marked this pull request as ready for review July 31, 2026 15:22
… works properly

- sidebar: /token-service/index → /token-service/ (VitePress serves index.md at /token-service/)
- sidebar: /hathora/index → /hathora/
- docs: update remaining links to use canonical trailing-slash form
Copilot AI lite review requested due to automatic review settings August 4, 2026 07:53
@icedream
Carl Kittelberger (icedream) merged commit 61d60c8 into main Aug 4, 2026
6 checks passed
@icedream
Carl Kittelberger (icedream) deleted the fix/sidebar-active-index branch August 4, 2026 07:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes VitePress sidebar active-state matching for section index pages by switching sidebar (and related in-text) links from /.../index to the directory’s trailing-slash route (/.../), which is the path VitePress serves for index.md.

Changes:

  • Updated sidebar.json entries to use trailing-slash links for index pages in the Token Service and Hathora sections.
  • Updated Markdown cross-references to the Token Service overview page to use the new canonical route.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/steelshield/unreal-engine-plugin/introduction.md Updates the Token Service link to the trailing-slash index route.
src/steelshield/token-service/sidebar.json Changes the Token Service overview sidebar link to /token-service/ for correct active-state matching.
src/multiplayer-servers/hathora/sidebar.json Changes the Hathora migration guide sidebar link to /hathora/ for correct active-state matching.
src/multiplayer-servers/getting-started/glossary.md Updates the Token Service overview link to the trailing-slash index route.

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.

5 participants