Retro Webpage uses React Router v6 with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/retro-webpage/llms.txt
Use this file to discover all available pages before exploring further.
HashRouter for all client-side navigation. Because HashRouter encodes the active route in the URL’s # fragment (for example, https://yoursite.com/#/about), the browser never sends the path portion to the server. This means the entire app is served from a single index.html entry point and routing is handled entirely in JavaScript — making it a perfect fit for static hosts like GitHub Pages with no extra server configuration required.
Existing Routes
The router is defined insidemain.js and mounts nine routes, each mapping a URL path to a React page component:
| Path | Component | Nav label |
|---|---|---|
/ | Home | Home |
/about | About | About Me |
/projects | Projects | Projects |
/skills | Skills | Skills |
/work | Work | Resume |
/case-studies | CaseStudies | Long Reads |
/blog | Blog | Diary |
/testimonials | Testimonials | Guestbook |
/contact | GuestbookPage | Contact |
Adding a New Page
Follow these four steps to add a new route to the site. Because the app is compiled by Vite, you must rebuild after making source changes.Create a new page component
Define a new React component function in the source. Place it alongside the other page components in
main.js (or in a dedicated file that you then import). The component should return JSX that represents your page content.Add the route to the router
Register the new component by adding a The path you choose here becomes the hash fragment used in the URL:
<Route> inside the <Routes> block in main.js:https://yoursite.com/#/links.Add a nav link in the Layout
The site’s navigation is rendered by the If the Layout uses React Router’s
Layout component. To surface your new page in the nav bar, add a link entry alongside the existing items. Since the app uses HashRouter, links follow the #/path pattern:<Link> component, use to="/links" instead:Optionally add an HTML shell file under pages/
Each existing route has a corresponding HTML shell under Note the
pages/ (e.g., pages/About.html). These files exist so that a user who bookmarks or is linked to pages/links.html directly can still load the app. The shell sets the correct starting hash via an inline script, then loads assets/main.js.Create pages/links.html following the same pattern as pages/About.html:../ prefix on asset paths — shell files sit one directory deeper than index.html.HashRouter vs BrowserRouter
Retro Webpage deliberately usesHashRouter rather than BrowserRouter. Here is how they compare:
HashRouter | BrowserRouter | |
|---|---|---|
| URL style | example.com/#/about | example.com/about |
| Server config required | ❌ None | ✅ Must serve index.html for all paths |
| Works on GitHub Pages | ✅ Out of the box | ⚠️ Needs workaround |
| Works on Netlify / Vercel | ✅ Out of the box | ✅ With a _redirects or vercel.json rule |
| SEO / link previews | ⚠️ Hash URLs are less readable | ✅ Clean URLs |
HashRouter is the lower-friction choice. If you later move to a platform that supports redirect rules (Netlify, Vercel, a custom server), you can swap HashRouter for BrowserRouter in main.js without changing any route definitions.