Website of HackNitra, a community of people who came back to Slovakia and tech enthusiasts in Nitra. It's a static site built with Astro: the home page, the privacy policy for the Tvor AI Ty Build Day event at /sukromie, and a 404 page. It ships no client-side JavaScript, makes no third-party requests and sets no cookies.
src/data/site.ts content that changes: stats, team, formats, events, guests, contacts
src/components/ one component per section of the home page, plus the shared header and follow bar
src/pages/ index (home), sukromie (privacy policy), 404
src/styles/global.css brand colours, base styles and the pieces every page shares
src/styles/home.css home page sections
src/styles/privacy.css privacy policy layout and its print styles
src/assets/ logo, team and event photos (resized and converted to WebP at build)
src/lib/typography.ts Slovak no-break spaces for body copy that comes from data
public/ favicon, touch icon, social preview image, CNAME
.github/workflows/ build and deploy to GitHub Pages
Requires Node 22.12 or newer and pnpm. The pnpm version is pinned in the packageManager field of package.json; corepack enable picks it up automatically.
pnpm install
pnpm dev # http://localhost:4321
pnpm build # type-checks with astro check, then writes dist/
pnpm preview # serves dist/pnpm only runs a dependency's install script if allowBuilds in pnpm-workspace.yaml allows it; pnpm install fails on any it hasn't been told about. sharp is listed as a direct dependency because pnpm's strict layout otherwise hides it from Astro's image optimization.
Most updates only touch src/data/site.ts.
Adding an event: put the photo in src/assets/events/, import it at the top of site.ts, and add an entry to events in date order. date is YYYY-MM; the year groups and Slovak month labels are generated from it. Every photo needs an alt text. If a photo's subject gets cropped off, set position (a CSS object-position, for example '50% 30%'). For an event without a photo, leave photo out.
Stats are written by hand. When you add an event or a guest, update the numbers in stats as well.
Slovak typography: in body text, one-letter words (a, i, k, o, s, u, v, z) must not end a line. Copy written directly in a component uses after them; copy that comes from site.ts goes through tie(), which does this automatically. Keep that when you edit.
Privacy policy: the text lives in src/pages/sukromie.astro. Each numbered section is a <section class="part"> with an id, which the table of contents links to; keep the two in step. Wrap a phrase in <mark> to highlight it. When the policy changes, update both dates in the row under the hero and the date in section 12. The page prints cleanly (or saves as PDF) without the header, table of contents and footer.
Social preview: public/og.jpg is a 1200×630 screenshot of the header and hero, with the stats and follow bar hidden. Retake it if the hero changes.
- Push this repo to GitHub.
- In Settings → Pages, set Source to GitHub Actions. Every push to
majsterthen builds and deploys the site (.github/workflows/deploy.yml). Don't use Deploy from a branch: that publishes the repo as-is through Jekyll, which can't build an Astro project and fails on the.astrofiles. - In the same page, set Custom domain to
hacknitra.sk.public/CNAMErecords the same domain and ships in the build, but with an Actions deploy GitHub reads the domain from this setting, so it has to be set here too. - At the DNS provider, point the apex
hacknitra.skat GitHub withArecords185.199.108.153,185.199.109.153,185.199.110.153and185.199.111.153, and add aCNAMErecord forwwwwith the valuehacknitra.github.io. Delete any otherAorAAAArecords on both names: a leftover one sends some visitors to the old host and stops GitHub from issuing the HTTPS certificate. For IPv6, use GitHub'sAAAArecords2606:50c0:8000::153to2606:50c0:8003::153. - Once the certificate is issued, enable Enforce HTTPS.
site in astro.config.mjs is https://hacknitra.sk; the canonical and social-preview URLs are built from it. To serve the site from hacknitra.github.io/<repo>/ instead, also set base: '/<repo>' there.
Headings use Barlow Condensed 900 from @fontsource/barlow-condensed (SIL OFL). It's bundled at build time and served from our own domain, so visitors' IP addresses are never sent to Google. Both the latin and latin-ext subsets are included, because č, ď, ľ, ň, š, ť and ž are in latin-ext. Body text uses the system's Courier New.