Skip to content

chore(website): streamline deps, adopt Astro Fonts/Content Layer, and add astro check + oxfmt - #429

Draft
100gle wants to merge 1 commit into
bubbuild:mainfrom
100gle:chore/website-deps-and-astro-tooling
Draft

100gle wants to merge 1 commit into
bubbuild:mainfrom
100gle:chore/website-deps-and-astro-tooling

Conversation

@100gle

@100gle 100gle commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Streamline website/ dependencies, adopt Astro 7 native Fonts API and Content Layer loader, and add astro check + oxfmt to the website workflow and CI.

What changed and why

  1. Dependency cleanup, deduplication, and override audit

    • Removed unused dependencies (clsx, tailwind-merge) along with dead files (website/src/lib/utils.ts, website/components.json).
    • Upgraded compatible packages within the 3-day release cooldown (astro@7.4.13, @astrojs/cloudflare@14.4.9, @astrojs/starlight@0.43.2, @astrojs/markdown-satteri@0.4.10, satteri@0.11.7, @tailwindcss/vite@4.3.5, tailwindcss@4.3.5, pele@1.13.0, satori@0.63.2, motion@14.14.0, @lucide/astro@1.83.0, wrangler@4.168.0).
    • Deduplicated duplicate heavy packages down to single versions: workerd, miniflare, @astrojs/markdown-satteri, @astrojs/compiler-rs, shiki, and lightningcss.
    • Cleaned up website/pnpm-workspace.yaml: removed obsolete minimumReleaseAgeExclude (pele@1.6.0), miniflare>undici, and miniflare>sharp overrides (resolved upstream in miniflare@5.20261123.1-beta). Kept satori>fflate: ^0.7.5 until satori@0.64.3+ clears the 3-day cooldown, and kept supportedArchitectures: [current, wasm32] for Sätteri's Cloudflare WASI fallback.
  2. Type checking (astro check) & formatting (oxfmt)

    • Added @astrojs/check@0.9.12 + typescript@6.0.3 (pnpm check) to validate .astro templates, props, content collections, and TypeScript across the site.
    • Fixed type errors surfaced by astro check: excluded examples in website/tsconfig.json, switched Icon.astro from IconProps to LucideProps, narrowed FontEntry.weight in src/lib/og.ts, wrapped Buffer in new Uint8Array(png) in src/pages/og/[...route].ts, and fixed null narrowing in TapeModel.astro and Testimonials.astro.
    • Added oxfmt@0.80.0 + direct @astrojs/compiler-rs@0.5.3 (pnpm fmt / pnpm fmt:check) with .oxfmtrc.json configured for Astro (compressHTML: "html"), built-in Tailwind v4 class sorting (stylesheet: "./src/styles/global.css"), and ignorePatterns avoiding conflicts with repo pretty-format-json and autocorrect hooks.
    • Wired pnpm --dir website check, pnpm --dir website fmt:check, and node --test website/scripts/pele.test.mjs into the check-docs job in .github/workflows/main.yml.
  3. Adopt Astro 7 native features

    • Astro Fonts API: Configured Outfit and JetBrains Mono via fontProviders.fontsource() in website/astro.config.mjs, rendered <Font ... preload /> in BaseLayout.astro and a minimal Starlight Head override (src/components/StarlightHead.astro), and removed @fontsource-variable/outfit and @fontsource-variable/jetbrains-mono (static @fontsource/outfit and @fontsource/noto-sans-sc remain for Satori OG image generation).
    • Content Layer GitHub stats loader: Replaced website/scripts/generate-github-snapshot.mjs, predev/prebuild scripts, and gitignored src/data/github-snapshot.ts with a build-time github Content Layer collection in website/src/content.config.ts (including fixing the /\.0$/ star-formatting regex). Updated website/AGENTS.md and website/DEPLOYMENT.md accordingly.

Impacted modules & commands

  • website/ (package.json, pnpm-lock.yaml, pnpm-workspace.yaml, astro.config.mjs, tsconfig.json, .oxfmtrc.json, src/, AGENTS.md, DEPLOYMENT.md)
  • .github/workflows/main.yml (check-docs job)
  • New scripts in website/: pnpm check, pnpm fmt, pnpm fmt:check

Verification

  • pnpm --dir website install --frozen-lockfile — passed (supply-chain policy verified)
  • pnpm --dir website check (astro check) — 0 errors, 0 warnings across 43 files
  • pnpm --dir website fmt:check (oxfmt --check) — 47/47 matched files passed
  • node --test website/scripts/pele.test.mjs — 3/3 passed
  • BUB_ASTRO_IMAGE_MODE=build pnpm --dir website build — 83 pages built, 4 self-hosted variable .woff2 fonts bundled & preloaded on landing and Starlight docs pages, live GitHub stats rendered, 8 OG PNGs & Pagefind index generated
  • prek pre-commit hooks (check-yaml, check-json, pretty-format-json, end-of-file-fixer, trailing-whitespace) — all passed on commit

This branch has not been deployed

No deployments
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