Skip to content

sportclimbing/web

Repository files navigation

World Climbing (IFSC) Calendar and Streams Frontend

Deploy static content to Pages

Frontend for ifsc.stream, built as a static Astro site.

It renders World Climbing season/event data generated by sportclimbing/ifsc-calendar and deploys static output to GitHub Pages.

Current status

  • Astro pages/components live in src/, static output is generated in dist/.
  • Browser app code lives in src/js/app/ and is bundled into public/js/app.js.

Pages:

URL Description
/ Current season calendar
/season/:season/ Past season calendar
/season/:season/event/:eventSlugAndId/ Individual event page
/archive/ All historical seasons
/faq/ FAQ
/privacy-policy/ Privacy policy
/start-list-modals/:season/:eventId.html Start-list modal fragments
/modals/filters.html, /modals/sync.html Filter/sync modal fragments

Local development

  • Install dependencies: npm install --no-package-lock
  • Start dev server: npm run dev
  • Build site: npm run build
  • Preview build: npm run preview
  • Rebuild JS only: npm run build:js (or npm run build:js:min)
  • Rebuild Tailwind CSS: npm run build:tailwind
  • Rebuild modals CSS: npm run build:modals-css (or npm run build:modals-css:min)

After editing any file under src/js/app/, regenerate the bundle with npm run build:js.

Data and generated artifacts

  • Season source data: events/events_YYYY.json
  • Structured data: node bin/build-structured-data.mjs [--minify]
  • Sitemap: node bin/build-sitemap.mjs
  • Material Symbols font subset: python3 bin/subset-material-symbols.py
  • Athlete photo cache/resize: node bin/cache-athlete-photos.mjs
  • YouTube thumbnail cache/resize: node bin/cache-youtube-thumbnails.mjs

Integration tests

Playwright integration tests live in tests/integration.

  • make test auto-selects Docker when available (recommended).
  • make test-local runs on host machine.
  • make test-docker forces Playwright Docker image.

CI and deploy

Workflow: .github/workflows/static-deploy.yml

  • Triggered on main pushes, hourly schedule, and manual dispatch.
  • Rebuilds Tailwind CSS, JS bundle, structured data, and sitemap fresh on every deploy.
  • Asset version set from commit SHA for cache-busting.
  • Deploys dist/ to GitHub Pages.

TO DO

  • Clean up JS (especially in .astro files)
  • Add light mode
  • Fix real athlete count in Archive Page
  • Rebuild previous event JSON file
  • Verify streams show correctly when live
  • Add browser notifications
  • Improve breadcrumb navigation
  • Add privacy policy
  • Download, resize, and serve YouTube thumbnails from GH pages
  • Fix links to events in .ics calendar

Sponsor this project

 

Contributors