Skip to content

docs(site): fix slide deck navigation under base path#1153

Merged
jamesadevine merged 1 commit into
mainfrom
devinejames/slides-routing-fix
Jun 22, 2026
Merged

docs(site): fix slide deck navigation under base path#1153
jamesadevine merged 1 commit into
mainfrom
devinejames/slides-routing-fix

Conversation

@jamesadevine

Copy link
Copy Markdown
Collaborator

Summary

Fixes broken slide navigation on the deployed intro deck (added in #1152).

The deck was built with history routing under an absolute base (--base /ado-aw/slides/), so advancing slides appended the base to the URL instead of replacing the route — producing paths like:

https://githubnext.github.io/ado-aw/slides/ado-aw/slides/4

Fix

  • routerMode: hash — navigation now stays within a single hash route (/ado-aw/slides/#/4), which is the canonical configuration for static hosting under a subpath (GitHub Pages). Deep-link reloads work without server-side SPA fallback.
  • --base ./ — assets are referenced relatively (./assets/…), so they resolve correctly under /ado-aw/slides/ regardless of routing.

Test plan

Verified the built deck with a headless-browser check (served at its real /ado-aw/slides/ base):

  • Advancing 5 slides: …/slides/#/1…/slides/#/6no base duplication.
  • Slide content renders (e.g. "Key principles …"); zero page errors.
  • Deep-link reload at …/slides/#/6 renders correctly, including the Mermaid SVG diagram.
  • Presenter mode loads at …/slides/#/presenter/1.
  • cd site && npm run build still completes; links validation passes.

The deployed deck used history routing with an absolute base, so advancing slides appended the base to the URL (…/ado-aw/slides/ado-aw/slides/4). Switch to relative asset base (--base ./) and hash routing (routerMode: hash) so navigation stays within /ado-aw/slides/#/N and deep-link reloads work on static GitHub Pages hosting.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesadevine jamesadevine merged commit 7ad00ad into main Jun 22, 2026
13 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