pcbjam/site
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Istvan Matejcsok 40b53ad530 analytics: consolidate everything onto one shared Plausible pa- script
All pcbjam properties now load the same new-format Plausible script
(https://plausible.io/js/pa-KjNS9YmidydULZTstsjRg.js — one dashboard,
segment by hostname) instead of per-domain data-domain sites:

- site: replace Vercel Analytics with the pa- snippet in BaseLayout
  (is:inline, prod-only, crossorigin="anonymous" for the COEP
  require-corp routes in vercel.json); drop @vercel/analytics dep.
  Legal pages (cookies/privacy) rewritten Vercel -> Plausible.
- standalone: initAnalytics() rewritten for the new script format
  (queue shim + plausible.init(), async, no data-domain). The gate is
  now VITE_PLAUSIBLE_SRC (script URL, deploy-time opt-in) — unset means
  no tracking, so dev checkouts and third-party GPL builds stay clean.
  VITE_PLAUSIBLE_DOMAIN is gone.
- deploy: build-demo/build-editor --plausible now takes the script URL;
  release.yml/deploy-demo.yml hardcode the (public) pa- URL, so the
  repo Actions variable PLAUSIBLE_DOMAIN is no longer used.

Verified: standalone tsc + vite build (pa- URL present with env, absent
without, crossOrigin kept); astro build has the snippet on all layout
pages and no vercel/insights references; astro dev stays untracked.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 19:34:09 +02:00
..
brand feat(site): 🫙 PCBJam landing revisions — branding, accuracy, positioning graphic 2026-06-07 17:14:19 +02:00
public site(blog): devblog w28 — collab week (presence videos, y-sexpr v2, platform) 2026-07-13 17:57:57 +02:00
src analytics: consolidate everything onto one shared Plausible pa- script 2026-07-15 19:34:09 +02:00
.env.example fix(site): wire Resend waitlist via astro:env, fix TS errors + deprecations 2026-06-08 14:26:54 +02:00
.gitignore feat(site): link the live demo + serve the gerber demo from the versioned CDN 2026-07-02 07:40:30 +02:00
astro.config.mjs feat(site,demo): OG share cards + demo page meta ahead of the HN post 2026-07-04 09:14:44 +02:00
package-lock.json analytics: consolidate everything onto one shared Plausible pa- script 2026-07-15 19:34:09 +02:00
package.json analytics: consolidate everything onto one shared Plausible pa- script 2026-07-15 19:34:09 +02:00
postcss.config.mjs feat(site): 🛬 PCBJam landing page — waitlist, sections, Tailwind 2026-06-07 14:59:13 +02:00
README.md feat(site): 🚀 add Astro marketing/content site 2026-06-07 08:57:37 +02:00
tsconfig.json feat(site): 🚀 add Astro marketing/content site 2026-06-07 08:57:37 +02:00
vercel.json Updated vercel.json blog url. 2026-06-18 15:46:08 +02:00

site

Public-facing marketing/content site for the KiCad WebAssembly project: landing page, blog, and legal pages. Built with Astro 6.

This is a standalone project — it is intentionally decoupled from the /web app monorepo (which is the product itself: React frontend + Fastify backend). It uses npm (not the monorepo's pnpm) and has its own package-lock.json.

What it ships

  • Static by default: every page is prerendered to HTML and ships zero client JavaScript. A visitor downloads HTML + CSS only — no React/JS bundle.
  • SSR-capable: the Vercel adapter is wired in, so any individual route can be switched to per-request server rendering without ripping anything out (see below).

Routes

Route Source
/ src/pages/index.astro
/blog src/pages/blog/index.astro
/blog/<id> src/pages/blog/[slug].astro
/terms src/pages/terms.astro
/privacy src/pages/privacy.astro
/cookies src/pages/cookies.astro

Blog posts are Markdown files in src/content/blog/, validated by the schema in src/content.config.ts. Add a post by dropping a new .md file there with title, description, and pubDate frontmatter.

Local development

Requires Node ≥ 22.12 (Astro 6 requirement).

cd site
npm install
npm run dev        # http://localhost:4321
npm run build      # outputs to dist/ (+ .vercel/output for the adapter)
npm run preview    # serve the production build locally

SSR per route

Pages are static by default. To render a specific page or endpoint on demand (per request, as a Vercel Function), add this to its frontmatter:

---
export const prerender = false;
---

That's the only change needed — the @astrojs/vercel adapter in astro.config.mjs already provides the server runtime. The rest of the site stays static.

Deploying to Vercel

The @astrojs/vercel adapter emits the Vercel Build Output API format, so no vercel.json is required.

  1. Push this repo to GitHub.
  2. Vercel dashboard → New Project → import this repo.
  3. Click Edit next to Root Directory and set it to site. This is the standard way to deploy a project that lives in a subdirectory.
  4. Vercel auto-detects the Astro framework preset and the package manager from the lockfile. Leave the build/install commands at their defaults.
  5. Deploy. Static pages are served from the CDN; any route with prerender = false is deployed as a Vercel Function automatically.

Note: do not use vercel.json for URL rewrites with Astro — use Astro's redirects option in astro.config.mjs instead.