Once you’ve runDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/magical/llms.txt
Use this file to discover all available pages before exploring further.
npm run build and confirmed the output looks right with npm run preview, you’re ready to ship. Magical Portfolio’s dist/ folder is pure static output — HTML, CSS, and JavaScript with no server-side dependencies — which means it can be deployed to virtually any hosting platform in minutes. The three options below cover the most common paths: GitHub Pages for free hosting tied to your GitHub account, Netlify for zero-config continuous deployment with a generous free tier, and Vercel for the same one-click flow with excellent edge performance. Pick the one that fits your workflow.
- GitHub Pages
- Netlify
- Vercel
GitHub Pages hosts static sites directly from a GitHub repository branch. You can deploy by pushing the Option A — Deploy with the
Commit this file to
dist/ folder to a gh-pages branch manually using the gh-pages npm package, or you can automate the entire process with a GitHub Actions workflow that builds and deploys on every push to main.Option A — Deploy with the gh-pages package
Add deploy scripts to package.json
Open
package.json and add two entries to the "scripts" block:predeploy runs automatically before deploy, so the bundle is always fresh before it’s pushed.Set the homepage field
Also in
package.json, add a "homepage" field pointing to your GitHub Pages URL. Replace <username> and <repo> with your GitHub username and repository name:Run the deploy command
Push the built The command builds the project, then uses the
dist/ folder to the gh-pages branch:gh-pages CLI to force-push the contents of dist/ to the gh-pages branch of your remote repository. GitHub Pages picks up the change within a minute or two.Option B — Deploy with GitHub Actions
For a fully automated pipeline that builds and deploys on every push tomain, add the following workflow file to your repository:.github/workflows/deploy.yml, push to main, and the Actions runner will install dependencies, build the project, and push the freshly compiled dist/ folder to the gh-pages branch automatically. No local npm run deploy needed.The
.nojekyll file already present in the repository root is important here. When GitHub Pages serves your site, it normally runs the content through Jekyll first. Jekyll would attempt to process the HTML shims and could interfere with Vite’s ES module <script> tags. The empty .nojekyll file signals GitHub Pages to skip Jekyll entirely and serve the files exactly as built. Without it, your routes might load a blank page or throw a 404 on assets.After deployment
Verify all routes load correctly
Once the site is live, click through every page to confirm the hash routing shims are working end-to-end:- Visit the root URL (e.g.
https://yoursite.example.com) — confirmsindex.htmland the#/route work. - Navigate directly to each page shim by appending the path:
/pages/About.html→ should redirect to/pages/About.html#/aboutand render the About page/pages/Projects.html→ should render the Projects page/pages/Skills.html,/pages/Writing.html,/pages/CaseStudies.html,/pages/Contact.html— same pattern
- Hard-refresh on each page (Ctrl+Shift+R / Cmd+Shift+R) to confirm the shim script fires on a cold load.
- Check your browser’s DevTools console for any 404 errors on assets.
Custom domain
All three platforms support custom domains:- GitHub Pages — go to Settings → Pages → Custom domain in your repository.
- Netlify — go to Site settings → Domain management → Add custom domain.
- Vercel — go to Project Settings → Domains → Add domain.