Skip to content

feat: deploy to GitHub Pages with adapter-static#5

Open
raduab wants to merge 9 commits intojhwheeler:mainfrom
raduab:feat/github-pages-deploy
Open

feat: deploy to GitHub Pages with adapter-static#5
raduab wants to merge 9 commits intojhwheeler:mainfrom
raduab:feat/github-pages-deploy

Conversation

@raduab
Copy link
Copy Markdown

@raduab raduab commented Mar 4, 2026

Hey Jackson! I find your writing genuinely interesting and thought-provoking, and I think it deserves a wider audience than a GitHub repo. I'd love to help bring it more to life by getting the site deployed and accessible online.

Summary

  • Switch from adapter-auto to adapter-static with full prerendering for GitHub Pages deployment
  • Add GitHub Actions workflow that auto-deploys on push to main
  • Prefix all internal links with SvelteKit base path for /fluid_language/ subpath routing

Test plan

  • Merge PR and verify GitHub Actions workflow runs successfully
  • Enable GitHub Pages in repo settings (Settings → Pages → Source: GitHub Actions)
  • Verify site loads at https://jhwheeler.github.io/fluid_language/
  • Verify post links navigate correctly
  • Verify back link from posts returns to home
  • Verify tag filtering works

Notes on URL structure

The site deploys to https://jhwheeler.github.io/fluid_language/ (subpath) because GitHub Pages serves non-<username>.github.io repos under /<repo-name>/. This requires the paths.base config in svelte.config.js and {base} prefixes on all internal links.

To move to root domain (jhwheeler.github.io)

  1. Rename this repo to jhwheeler.github.io
  2. In svelte.config.js, remove the paths.base config (or set it to '')
  3. The base imports in components will resolve to empty string, so links work unchanged

To use a custom domain (e.g., fluidlanguage.com)

  1. In repo Settings → Pages → Custom domain, enter your domain
  2. Configure DNS (CNAME record pointing to jhwheeler.github.io)
  3. In svelte.config.js, remove the paths.base config (custom domains serve from root)
  4. Add a static/CNAME file containing your domain name

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 4, 2026

Deploy Preview for fluidlanguage ready!

Name Link
🔨 Latest commit 92565d3
🔍 Latest deploy log https://app.netlify.com/projects/fluidlanguage/deploys/69a85524eecfbf0008d01c78
😎 Deploy Preview https://deploy-preview-5--fluidlanguage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@raduab
Copy link
Copy Markdown
Author

raduab commented Mar 4, 2026

I hadn't realized the site already had a live deployment flow through Netlify! If you're happy with Netlify, feel free to close this PR. If you'd like to simplify things by using GitHub for both the repo and the live deployment, this PR sets that up. Enjoy!

raduab added 9 commits March 4, 2026 17:51
All internal hrefs now use SvelteKit's `base` from `$app/paths` so they
resolve correctly when the site is served under /fluid_language/.

Also guards `$page.url.searchParams` on the homepage with a `browser`
check so it doesn't break during prerendering.
- Initialize mounted = !browser to avoid content disappearing between
  SSR and onMount during hydration
- Extract dev detection to named const, include 'preview' mode so
  npm run preview works at root without base path
- Replace inner <main> with <div> in post page to avoid duplicate
  landmarks that confuse screen readers
- Simplify {#if mounted || !browser} to {#if mounted} since mounted
  is initialized to !browser, making the disjunction redundant
@raduab raduab force-pushed the feat/github-pages-deploy branch from 231c0e3 to 92565d3 Compare March 4, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant