Digital Alchemy’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/digital-alchemy/llms.txt
Use this file to discover all available pages before exploring further.
pages/ directory contains a static HTML file for every route in the app. Each file loads the same JavaScript bundle as index.html and includes a small bootstrap script that sets the correct hash before React mounts, enabling direct URL navigation and bookmark support on GitHub Pages without any server-side configuration.
The problem
GitHub Pages serves static files from a repository. When a user visitshttps://user.github.io/digital-alchemy/about directly — via a bookmark, a shared link, or a browser refresh — GitHub Pages looks for a file at about/index.html on disk. That file doesn’t exist, so GitHub Pages returns a 404 Not Found.
This is a fundamental constraint of any static hosting provider that doesn’t support server-side URL rewriting. Without a solution, only the root URL (/) would work for direct navigation — every other route would 404.
The solution: per-route static HTML files
Each route in Digital Alchemy has a corresponding HTML file in thepages/ directory. These files are full copies of index.html — they load the same JavaScript bundle — but they include a small <script> block that:
- Sets
window.__STATIC_PAGE_ROUTE__to the route path (for debugging / detection). - Sets
window.location.hashto the correct route hash if it isn’t already set.
HashRouter, setting window.location.hash = "/about" is equivalent to navigating to /#/about. The React app boots up, reads the hash, and renders the correct view — all without any server involvement.
The pattern
Here is the exact script frompages/About.html:
if condition ensures the hash is only overwritten when it is empty or set to the root — so if a user navigates directly to pages/About.html#/contact, their explicit hash is preserved rather than being forced to /about.
List of static pages
| File | Route | Page name |
|---|---|---|
pages/About.html | /about | The Witch |
pages/Projects.html | /projects | Summonings |
pages/Skills.html | /skills | Familiar Languages |
pages/Work.html | /work | Lineage |
pages/CaseStudies.html | /case-studies | Grimoire |
pages/Articles.html | /articles | Forbidden Knowledge |
pages/Testimonials.html | /testimonials | The Coven |
pages/Contact.html | /contact | Cast a Message |
/) is covered by index.html at the repository root — no additional static file is needed for it.
How to add a static page for a new route
Add the route to React Router
Register the new route in Also add a corresponding entry to the
assets/main.js following the existing pattern:navItems array in components/Layout.js.Create the static HTML file
Create a new file in
pages/ — for example pages/NewSection.html. Copy the structure from any existing file in pages/ and update the three values:<title>— the page titlewindow.__STATIC_PAGE_ROUTE__— the route path stringwindow.location.hash— the same route path string
Why not use a 404.html redirect?
A common GitHub Pages workaround is to create a404.html that redirects all unknown URLs back to index.html with the path encoded in the query string. Digital Alchemy uses explicit per-route files instead because:
- No redirect flash — users land directly on the correct HTML file rather than seeing a momentary 404 page.
- Correct HTTP status —
pages/About.htmlreturns200 OK, not404. This matters for SEO crawlers and link preview scrapers. - Explicit control — each page can have its own
<title>tag for accurate browser tab labels and history entries.