Adding a page to Web Surfer is a two-step process: first you register the route in the React app’s router config and create the page component, then you create a static HTML entry file in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/web-surfer/llms.txt
Use this file to discover all available pages before exploring further.
pages/ directory so that visitors can reach it directly by URL. Both steps are needed because the app uses hash-based routing — each HTML file is responsible for setting the correct hash before the React app boots.
How routing works
Web Surfer uses React Router v6 in hash history mode. Every URL in the site looks likeyoursite.com/#/about — the # fragment is what React Router reads to decide which component to render. All route definitions live in the router config in the source file src/main.jsx (or equivalent). Adding a new page means:
- Telling the router what path maps to what component.
- Giving that route its own HTML entry point so the page can be linked or bookmarked directly.
dist/ or built output.
Step-by-step: add a new page
Create your new React component
Add a new file at
src/pages/Portfolio.jsx (or wherever your source pages live). See the example component in the next section.Register the route in the router config
Open Wrap the component in
src/main.jsx and import your component, then add an entry to the createHashRouter array:src/main.jsx
<Layout> just like every other route so it inherits the header, footer, sparkle cursor, and page-transition animation.Create a static HTML entry file
Create Change
pages/Portfolio.html in the repository root (alongside the existing pages/About.html, pages/Skills.html, etc.). Use this pattern — it is identical to every other page file except for the title and route value:pages/Portfolio.html
"/portfolio" to match the path you used in the router config.Rebuild the project
Run the build command to compile your new component and update the output assets:After the build completes,
dist/pages/Portfolio.html will be present alongside the updated dist/assets/main.js.Using Win98Window in your page
TheWin98Window component wraps any content in a fully interactive Windows 98–style window chrome with a title bar, minimize, maximize, and close buttons. Import it from components/Win98Window and pass a title and optional icon prop:
src/pages/Portfolio.jsx
Win98Window accepts these props:
| Prop | Type | Description |
|---|---|---|
title | string | Text shown in the title bar |
icon | ReactNode | Optional icon rendered before the title (16 × 16 recommended) |
className | string | Extra classes applied to the outer window wrapper |
contentClassName | string | Extra classes applied to the inner win98-content div |
defaultMaximized | boolean | Start the window in full-screen maximized state |
onClose | function | Callback fired when the ✕ button is clicked |
The
pages/ HTML files in the repository are Vite build outputs — they are not hand-authored pages. The window.__STATIC_PAGE_ROUTE__ script block is the key ingredient: it sets the URL hash before React boots, so the router sees the correct path immediately and renders the right component. This is how each page can be a standalone HTML file without any server-side routing or redirect rules.