Web Weaver’s routing is powered by React Router v6 with hash-based URLs — each new page is a React component, a registered route, a static HTML file for direct linking, and a nav entry. All four pieces live inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/web-weaver/llms.txt
Use this file to discover all available pages before exploring further.
assets/main.js, except the static HTML file which goes in pages/. This guide walks through each step, then covers how to populate existing pages by extending the built-in data arrays.
Adding a New Page
Write a new React component in main.js
Open Use the same Tailwind utilities found throughout the project (
assets/main.js and define your new page component. Place it near the other page-level components (look for HeroSection, ProjectsPage, etc.). The component is a plain React function that returns JSX:assets/main.js
bg-ink, text-teal-bright, font-serif, font-mono) so the new page stays visually consistent with the existing aesthetic.Register a route in the Routes block
Find the The path you choose here becomes the hash segment in the URL — visitors will reach this page at
<Routes> block in main.js — it contains all existing <Route> declarations. Add your new route inside it:assets/main.js
https://yoursite.com/#/spellbook.Create a static HTML file in pages/
Each route needs a corresponding static HTML file so that the page is directly linkable and indexable. Create The
pages/Spellbook.html with this template:pages/Spellbook.html
window.__STATIC_PAGE_ROUTE__ assignment is the critical piece — the React app reads this value on boot and navigates to the correct route when the page loads directly (not via the SPA’s own navigation).Add a nav link in the Layout component
Find the The
Layout component in main.js — it contains the site-wide <header> with navigation links. Add your new page to the nav list:assets/main.js
isActive class swap (text-teal-bright when active, muted otherwise) follows the same pattern used by every other nav link in the Layout component.How Data Arrays Work
Web Weaver’s existing pages are driven by data arrays defined near the top ofassets/main.js. Each array holds plain JavaScript objects that the corresponding page component maps over to render cards, lists, and sections. To populate a page, you edit the array — no template logic changes required.
The six core arrays are:
| Variable | Page | Content type |
|---|---|---|
M | Projects | Portfolio project cards |
T | About | Skills wheel entries |
x | About | Work history timeline |
F | Projects | Case study entries |
E | Blog | Blog post previews |
q | About | Testimonial cards |
Extending Existing Pages
Projects — array M
Each project entry controls a card in the Projects grid. Add a new object to the M array:
assets/main.js
- new
- waxing
- full
- waning
"new" — New moon (dark circle). Use for projects in early ideation or not yet started.Skills — array T
Each skill entry places a node on the radial skills wheel. The angle value (0–360) controls where on the wheel the node appears:
assets/main.js
level is an integer from 0–100 that controls the node’s distance from the wheel’s centre and its visual weight.
Work History — array x
assets/main.js
Blog Posts — array E
Each blog post entry renders a Tarot-card-styled preview on the Blog page. The suit and number fields control the Tarot card designation displayed in the corner:
assets/main.js
wands
Fire energy — used for posts about building, creating, ambition, and new projects.
swords
Air energy — used for posts about logic, debugging, architecture decisions, and sharp thinking.
cups
Water energy — used for posts about UX, design, emotion, and human-centred work.
pentacles
Earth energy — used for posts about performance, infrastructure, tooling, and practical craft.
Testimonials — array q
assets/main.js
| Value | Familiar | Vibe |
|---|---|---|
"cat" | Black cat | Mysterious, independent collaborator |
"raven" | Raven | Wise, perceptive, high praise |
"owl" | Owl | Thoughtful, detail-oriented feedback |
"toad" | Toad | Earthy, practical, grounded endorsement |
"bat" | Bat | Energetic, fast-moving, startup context |
Case Studies — array F
assets/main.js
Personalising Hero Text
The hero name and tagline are plain string literals inside theHeroSection function in main.js. Search for "Morgan Weaver" and "Software Sorcery & Digital Hexes" to locate and replace them:
assets/main.js
After editing
main.js, run npm run build to regenerate the dist/ folder before deploying. During local development with npm run dev, Vite’s HMR will hot-reload changes to data arrays immediately without a full page refresh.