Repository navigation
Modernize the site: Nuxt 4 + TypeScript + Bun, optimized assets, GitHub Pages deploy - #1
Merged
Merged
Conversation
Replace Vue CLI 4 / webpack / Babel / Yarn with Vite 8 and Bun, and move from Vue 2 + vue-router 3 to Vue 3.5 + vue-router 5. ESLint moves to v10 with a flat config. - index.html moves to the project root with a module entry; drop the link to css/style.css, which never existed - Mount on #app, since Vue 3 no longer replaces the mount element - Router: createRouter/createWebHistory, catch-all as /:pathMatch(.*)*, drop the removed `exact` prop (v4+ active matching is per route) - Declare `emits` on components that re-emit click/close/change, so Vue 3 doesn't also fall the listener through to the root element - Sass: @import -> @use, str-slice/inspect -> string.slice/meta.inspect - Template images use absolute /images/... paths (Vite would otherwise try to resolve relative src attributes as modules) - Event.vue: remove `rgba(var(--accent-color)F0)`, which modern Sass rejects and which browsers already ignored as invalid, so rendering is unchanged - Drop the unused babel.config.js, core-js and the leftover shopify-buy/vuex dependencies Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
Assets (public/ 80 MB -> 3.7 MB): - Re-encode every photo PNG as WebP sized to how it is displayed (60.9 MB -> 1.7 MB; e.g. featured locations 26 MB -> 330 KB) - Re-encode the home background video to 720p H.264 without the (always muted) audio track, with faststart (17 MB -> 1.85 MB) - Remove images nothing references anymore (articles, slides, shirt, history/image4) - Lazy-load and async-decode below-the-fold images; give avatar images intrinsic sizes Render-blocking third-party CSS removed (5 requests to 3 hosts): - Bootstrap grid + utilities (~96 KB) -> the 1.6 KB of rules actually used, plus Meyer reset, bundled in src/styles/vendor.css - Google Fonts (every weight/style of Poppins and Merriweather) -> self-hosted latin Poppins 300/400/500/700/900 via @fontsource; Merriweather is only loaded by the (unrouted) Century page - Material Icons font -> an Icon component with inline SVGs for the seven glyphs in use Runtime: - Campus: the server status was fetched every 3s forever, even after leaving the page. Poll every 60s (mcsrvstat caches for a minute), skip while the tab is hidden, refresh on return, stop on unmount; move to the v3 API - Club credits: replace the never-cleared 25ms setInterval scrolling with a compositor-only CSS transform animation at the same speed, still pausing on hover, and honouring prefers-reduced-motion - Club: shuffle builders once instead of on every render - Timeline: key events by title (club events have no warp, so every key was undefined) - Location: clear the body scroll lock if unmounted while full screen Also: meta description and theme colour, fix the web manifest's icon paths and name, delete unused Card and News components. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
- Build with vite-ssg: /, /campus and /club are rendered to static HTML at build time (flat club.html/campus.html so Pages serves them without a redirect) and hydrate into the same SPA; the catch-all route is also rendered as 404.html, which Pages serves with a 404 status - Critical CSS is inlined per page with beasties - Per-page <title> via @unhead/vue, driven by route meta - Club: shuffle the builder credits after mount so the pre-rendered HTML hydrates without a mismatch - Campus: show "Checking mc.blockeley.com" until the first status response, instead of baking "offline" into the static HTML - public/CNAME for blockeley.com - .github/workflows/deploy.yml: lint + build every pull request; on push to develop (or manual dispatch) upload dist/ and deploy it with actions/deploy-pages Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
- Every component and view is now <script setup lang="ts"> with typed props (defineProps<...>), emits and slots; main, router, data and the Vite/ESLint configs are .ts - Strict tsconfig (via @vue/tsconfig) plus noUncheckedIndexedAccess and noUnused*; shared TimelineEvent/Member types in src/types.ts, route meta typed through vue-router's RouteMeta, mcsrvstat response typed - Icon names are a union derived from the SVG path map, so an unknown icon is a type error - Boolean props (alternate, continue, centered, progress) are real booleans; callers pass the bare attribute instead of the "true" string - `bun run build` type-checks with vue-tsc first; `bun run typecheck` runs it alone and CI runs it as its own step - ESLint uses @vue/eslint-config-typescript (typescript-eslint) TypeScript 6.0: TypeScript 7's native compiler has no JS API yet, which vue-tsc and typescript-eslint (<6.1) both need. Bugs the type checker found: - Framed bound a `classObject` that was never defined - Credits used `credits` as both the prop and the template ref name Also works around a vite-ssg bug: its duplicate check for the <link>s it adds never matches, so a CSS chunk the entry already links (Splash's, now that Rolldown splits the Vue runtime into a shared chunk) got a second non-CORS link and was downloaded twice. onPageRendered now keeps only the first link per URL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
The previous 720p encode was corrupt: decoding it reports invalid NAL units throughout, so browsers can fail to play it or show glitched frames. Re-encoded from the original with the same settings (720p H.264 CRF 30, no audio, faststart, 1.85 MB); a full decode now reports no errors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
…rant-faraday-ux7zgr-pages
…t-faraday-ux7zgr-typescript
Root-cause fixes: - Patch vite-ssg's duplicate-<link> check (`attrs.file` -> `attrs.href`) with `bun patch`, replacing the regex dedupe in vite.config.ts - Page scroll lock is CSS (`body:has(.mobile-navigation, .location-full-screen)`) instead of two components toggling a body class - Accent colours live in route meta and are set as --accent-color on the app root; the tint uses color-mix() and the blob is a mask, replacing a route-name-keyed SCSS map that generated a data-URL per colour (four of them for routes that no longer exist) - One navigationLinks list (src/site.ts) drives both the desktop bar and the mobile menu, which had drifted: mobile said "Explore" and had no link to Club - Campus scroll buttons use scrollIntoView + scroll-margin-top instead of offsetTop arithmetic Simplifications: - Shared URLs (Discord, Patreon, builder form) defined once in src/site.ts - Button/LinkButton/IconButton: let @click fall through instead of re-emitting; drop unused props and CSS (progress spinners, IconButton link/colour/notification variants); IconButton is a real <button>, LinkButton a plain <a> - Options uses defineModel; Campus binds v-model to "Java"/"Bedrock" - framed-image Sass mixin replaces three copies of the image-frame CSS; aspect-ratio replaces padding-top ratio hacks - Club renders both boards from one v-for; builders.ts is a plain array; dead .space-wrapper @extend and col-xs-12 removed - Inline single-use computeds, v-bind="event" in Timeline, merged duplicated media-query blocks Efficiency: - Navbar/footer/mobile logo uses a 2.3 KB 160px image instead of the 16 KB 920px one; poster re-encoded at 1280px (77 KB -> 35 KB) and preloaded with high priority on the home page - Background video is fetched and played after mount, and skipped for prefers-reduced-motion and Save-Data - Location is loaded on demand by Event, so /club no longer downloads it - Server status: a tab coming back into view only refetches when the last check is over a minute old - Remove unused images (logo.png, logo-light.png, seven avatar icons); favicon.ico moves to the site root where browsers request it Content: the 404 page linked to /merchandise (removed on develop), which itself 404s; it now links to the Club page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
Nuxt replaces the hand-assembled Vite + vite-ssg + vue-router + unhead setup with the mainstream, actively maintained Vue framework, and `nuxt generate` pre-renders the site exactly as before. - src/ -> app/ (Nuxt 4 layout): views become file-based pages (index/campus/club), App.vue becomes layouts/default.vue, PageNotFound becomes error.vue; components, styles and data move as-is - Page title and accent colour come from definePageMeta; the error page passes its accent to the layout - experimental.prerenderErrorPages renders error.vue into 404.html at build time, so unknown URLs still get real content with a 404 status - nitro.prerender.autoSubfolderIndex: false keeps club.html/campus.html, served by GitHub Pages without a trailing-slash redirect - Links use NuxtLink, which also handles external URLs (adding rel="noopener noreferrer" for new tabs), so Button no longer picks between <a>/RouterLink itself - Head tags (lang, description, theme colour, icons, manifest) move to nuxt.config.ts; component styles are inlined into each page by Nuxt - ESLint uses @nuxt/eslint (aware of auto-imports); `v-slot:` is now the `#` shorthand throughout; type-checking is `nuxt typecheck` - Removed: vite-ssg and its patch, beasties, @unhead/vue (held on v2), direct vue-router/vite/@vitejs/plugin-vue, and the hand-written tsconfigs/ESLint setup - CI deploys .output/public Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
…ns, @nuxt/fonts - Bootstrap 5.0.0-alpha1 grid/utilities -> plain CSS: a .container primitive in app/styles/base.css, and each layout (section column, timeline, footer, board cards, location grid, navigation bar) sized in its own component with flexbox and a small columns() Sass function that keeps the original column widths - Meyer reset (2011) -> a modern reset after Josh Comeau and Andy Bell; menus use role="list", and the site keeps its line-height: 1 base explicitly. Images are now block-level, removing the inline-image gap under the footer logo (footer is 3px shorter) - Icons: @nuxt/icon with Iconify's Material Symbols (Google's successor to Material Icons), rendered as inline SVG at build time; replaces the hand-maintained Icon component and the icons8 PNG role icons, which required an attribution link the site didn't have. Role icons now take the page's accent colour - Fonts: @nuxt/fonts serves the same @fontsource Poppins files and adds metric-matched fallback faces, so text doesn't reflow when the web font loads; Merriweather is resolved the same way when 19th Century is on - Avatars: mc-heads.net looked up by Minecraft UUID instead of username, so a name change no longer breaks an avatar (images are identical). Crafatar was evaluated but is currently returning its fallback skin with a server error for every player - Timeline uses display: flow-root to contain its events' margins (the Bootstrap column did this implicitly as a flex item), and event headings hyphenate rather than breaking mid-word under the new reset Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
main is the production branch; develop is for work in progress. Deploying from the default branch also matches the github-pages environment's default deployment rule, so no environment change is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD
mathhulk
commented
Nov 22, 2026
|
|
||
| defineProps<{ | ||
| credits: readonly string[]; | ||
| }>( ); |
Collaborator
Author
There was a problem hiding this comment.
Can we implement prettier or some more modern oxc-based formatter to make all these files look nice?
Collaborator
Author
There was a problem hiding this comment.
Done in #10, using oxfmt, the Oxc project's formatter. It's Prettier-compatible, and in a comparison with Prettier on this repo the output matched apart from the default line width. It formats the Vue templates, scripts and styles, plus TypeScript, SCSS, JSON and YAML. CI now checks formatting on every PR. The rendered pages are pixel-identical before and after.
Generated by Claude Code
This was referenced Nov 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
developfrom Vue 2 / Vue CLI 4 up to a current stack, makes the site much lighter, and adds automatic deployment to GitHub Pages frommain. This PR combines what was previously reviewed as a stack of seven PRs (#2–#7 are closed in favour of this one). The commits are kept in that order, so each step can still be reviewed on its own.Stack
nuxt generate<script setup lang="ts">throughout@nuxt/eslint(ESLint 10),nuxt typecheckcolumns()helper that keeps the original widths)@nuxt/fonts: self-hosted latin Poppins in the 5 weights used, with metric-matched fallbacks@nuxt/icon+ Iconify Material Symbols, as inline SVGmain, with lint and type-check on every PRPerformance
/campuspage weight/clubpage weightFixes along the way
/merchandise, which was removed ondevelopand itself 404s. It now links to the Club page.undefinedkeys in the timeline;:has()rule instead of two components toggling a body class;Visible changes (everything else is pixel-identical to the live site)
Merging and deploying
develop.developintomain.main's last commit ("Remove commencement alert", 3226bdf) editedsrc/App.vueandsrc/views/Home.vue, which have since moved intoapp/.develophad already removed the commencement alert by other means, so nothing is lost.pagesbranch has a CNAME forblockeley.mathhulk.com.public/CNAMEis already set.After that, every push to
maindeploys automatically.mainis the default branch, so thegithub-pagesenvironment's default rule already allows it to deploy. Pull requests and pushes to other branches only lint, type-check and build.Notes
AvatarImage.vue.develop.app/views/Century.vueexplains how to enable it.Verification
bun install --frozen-lockfile, as CI runs it: lint,nuxt typecheckandnuxt generatepass.<title>;noopener noreferrer.🤖 Generated with Claude Code
https://claude.ai/code/session_01DxVDmLPux3Tx7RV1v4yznD