Skip to content

Latest commit

ย 

History

591 Commits

Folders and files

Repository files navigation

GDG Pisa's public website ๐ŸŒŽ

License

Welcome to the Google Developer Group Pisa public website ๐Ÿš€ Built with Astro โ€” fast, mobile-first, and easy to run locally with just Node.js (no Ruby, no gems ๐Ÿ™Œ).

The website is publicly available at https://gdgpisa.it/.

Feel free to fork โธ‘ or star โญ๏ธ this repo! Contributions are really appreciated โ€” have a look at the Contributing Guidelines or at our Issues.

Don't know where to start? ๐Ÿค” Have a look at our help wanted or good first issue tickets.

Features โœจ

  • โšก Astro โ€” ships (almost) zero JS by default, fast builds, npm/Vite dev server
  • ๐Ÿ“ฑ Mobile-first, single-page-first โ€” most content lives on the homepage, so there's no nav to duplicate or keep in sync
  • ๐ŸŽˆ Header shrinks into a floating pill on scroll
  • ๐ŸŒ— Light & dark theme โ€” follows system preference, with a manual toggle
  • ๐Ÿ”ด Live "next event" widget โ€” pulls the upcoming event straight from gdg.community.dev, no manual updates needed
  • ๐ŸŽช DevFest Pisa callout linking to devfest.gdgpisa.it
  • ๐Ÿ…ฐ๏ธ Google's Product Sans as the site's typeface
  • ๐Ÿงฉ Real icon libraries โ€” Google's Material Symbols for UI icons, Material Design Icons for social/brand marks
  • ๐ŸŽƒ๐ŸŽ„ Seasonal decorations โ€” Halloween bats & pumpkin, Christmas snow & Santa hat, switched on automatically by date (src/lib/seasons.ts); preview locally with npm run dev + ?season=halloween / ?season=christmas
  • โ™ฟ WCAG AA color contrast across light and dark themes

Getting started ๐Ÿ› 

You only need Node.js 22+ โ€” no Ruby, no Bundler, no gems.

git clone https://github.com/gdgpisa/gdgpisa.github.io.git
cd gdgpisa.github.io
npm install
npm run dev

The site will be available at http://localhost:4321/ with hot reload. ๐Ÿ”ฅ

๐Ÿณ Docker, if you'd rather not install Node locally

docker build -t gdgpisa-site .
docker run --rm -p 4321:4321 gdgpisa-site

Useful scripts ๐Ÿ“œ

Command What it does
npm run dev Start the local dev server with hot reload
npm run build Build the production site into dist/
npm run preview Preview the production build locally
npm run check Type-check the whole project
npm run test:unit Run Vitest unit tests
npm run test:e2e Run Playwright end-to-end tests

Project structure ๐Ÿ—บ

src/
โ”œโ”€โ”€ content/            ๐Ÿ“„ structured data (heroes.json)
โ”œโ”€โ”€ content.config.ts   ๐Ÿ”— Astro content collections + Zod schemas
โ”œโ”€โ”€ data/               ๐Ÿงญ social links (TypeScript)
โ”œโ”€โ”€ lib/                ๐Ÿง  pure logic: date formatting, live event fetch, chapter stats
โ”œโ”€โ”€ layouts/            ๐Ÿ—๏ธ page shells (BaseLayout, PageLayout)
โ”œโ”€โ”€ components/         ๐Ÿงฉ Header (+ nav links), ThemeToggle, HeroCard, UpcomingEvent, Icon, BrandIcon, ...
โ”œโ”€โ”€ styles/             ๐ŸŽจ design tokens, fonts, resets, global styles
โ””โ”€โ”€ pages/              ๐Ÿ“‘ routes (home, heroes, 404)
astro.config.mjs        ๐Ÿ”€ site config + short-link redirects (/feedbackform, /telegram, /gassistant)
public/
โ”œโ”€โ”€ fonts/product-sans/ ๐Ÿ…ฐ๏ธ self-hosted Product Sans font files
โ””โ”€โ”€ static/img/         ๐Ÿ–ผ๏ธ logos, seasonal SVGs (photos live in src/assets/ so Astro can optimize them)
  • Heroes (/heroes/) โ€” the Hall of Fame, sourced from src/content/heroes/heroes.json. Not in the nav (the homepage already shows the whole team) but linked from there and still a real page. Add someone new by adding an entry there (and their photo in src/assets/heroes/, where Astro resizes it and converts it to WebP at build time); set "visible": false to hide someone without deleting their record.
  • Prossimo evento โ€” the homepage widget fetches live data from the (unofficial, public) community.dev API for chapter 854 โ€” see src/lib/community-event.ts. It always has a graceful fallback if that call fails.
  • Chapter stats โ€” the "Cosa รจ un GDG" world/Italy chapter-count boxes are fetched at build time from community.dev's chapter sitemap โ€” see src/lib/chapter-stats.ts. Falls back to a static value if the fetch fails.
  • Icons โ€” Icon.astro wraps Google's Material Symbols (generic UI icons); BrandIcon.astro wraps Material Design Icons (mdi, via Iconify) for social/brand marks, with the real brand color by default or monochrome to match surrounding text.

Contributing ๐Ÿค

Feel free to contribute to this project! Have a look at our Contribution guidelines if you're not sure how to proceed.

Open an issue or submit a pull request โค๏ธ โ€” see CHANGELOG.md for what's already shipped and TODO.md for what's still open.

License ๐Ÿ“„

This project is licensed under the MIT License โ€” see the LICENSE file for details.

Releases

Packages

Used by

Contributors

Languages