No description
  • Astro 75.3%
  • TypeScript 11.7%
  • JavaScript 7.3%
  • CSS 5.3%
  • Dockerfile 0.4%
Find a file
Pavol Grinvalsky a8b67d5e79
All checks were successful
Build and deploy / build (push) Successful in 20m28s
Content from cms.ramlajay.com
The CMS moves to cms.ramlajay.com, its only address once
payload.grinvalsky.com is retired. The build fetches from there, and
the share images point there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 04:48:09 +02:00
.claude Update from Stacki 2026-09-16 23:53:58 +03:00
.forgejo/workflows Content from cms.ramlajay.com 2026-11-04 04:48:09 +02:00
.roo Update from Stacki 2026-09-01 23:13:53 +03:00
deploy Remove dead deploy/nginx.conf 2026-09-15 16:49:05 +03:00
fonts-src Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
public Add robots.txt and an auto-generated sitemap.xml 2026-09-17 22:12:09 +03:00
scripts Images: every photo gets the pixels it is shown at, and a build check 2026-11-04 03:18:43 +02:00
src Content from cms.ramlajay.com 2026-11-04 04:48:09 +02:00
.dockerignore Update from Stacki 2026-09-04 09:20:46 +03:00
.env.example Content from cms.ramlajay.com 2026-11-04 04:48:09 +02:00
.gitignore Update from Stacki 2026-09-04 09:20:46 +03:00
astro.config.mjs Build and publish from Payload: restore the deploy workflow 2026-10-30 13:36:31 +02:00
CONVENTIONS.md Extract apartments/[slug].astro into AptGallery / VillaGallery / AptInfo / RelatedApartments 2026-09-07 11:39:23 +03:00
DEPLOY-HETZNER.md Content from cms.ramlajay.com 2026-11-04 04:48:09 +02:00
Dockerfile Add Coolify path: Dockerfile + container nginx, config-driven / -> /sk redirect 2026-08-31 12:09:45 +03:00
Dockerfile.serve Wire Forgejo pipeline: build, publish to deploy branch, trigger Coolify 2026-09-06 03:27:42 +03:00
IMAGES.md Images: every photo gets the pixels it is shown at, and a build check 2026-11-04 03:18:43 +02:00
NOTES.md Update from Stacki 2026-09-04 09:20:46 +03:00
package-lock.json Upgrade Astro 5 → 7 and sharp to their patched versions 2026-09-17 22:20:20 +03:00
package.json Images: every photo gets the pixels it is shown at, and a build check 2026-11-04 03:18:43 +02:00
README.md Content from cms.ramlajay.com 2026-11-04 04:48:09 +02:00
tsconfig.json Initial commit: Grdelina Astro site + Netlify deploy config 2026-08-30 16:52:27 +03:00

grdelina-astro

This is the production Grdelina site. Fully static Astro, pre-rendered from Payload CMS (cms.ramlajay.com, the Grdelina site) at build time, built by Forgejo Actions and served by nginx on one Hetzner box. Editors publish with the "Publish site" button in Payload's Grdelina sidebar (~1 min to live). See DEPLOY-HETZNER.md.

Content moved from Directus to Payload in October 2026. src/lib/resources.ts still hands pages the shapes the Directus API returned (translations[0], directus_files_id, …), so pages and components didn't change; file ids are the Directus UUIDs kept on each imported Payload file.

History: originally built in Webstudio, then migrated to this repo. Webstudio and the earlier Netlify deployment are both retired — do not use either. NOTES.md has the migration record; inline // … Webstudio … comments are kept only as lineage notes for where a layout/behaviour came from.

Requirements

  • Node 20+ (CI/prod uses Node 22)
  • Network access to Payload (cms.ramlajay.com) at build time. Its Grdelina content is publicly readable, so no token is needed.

Setup

npm install
cp .env.example .env    # PUBLIC_PAYLOAD_URL defaults to the live instance

Commands

npm run dev        # dev server (fetches Payload per request)
npm run build      # static build → dist/  (pre-renders sk / en / hr + / redirect)
npm run preview    # serve dist/
npx astro check    # type-check

How it works

  • Content: fetched from Payload's REST API (grdelina-* collections and globals) at build time. src/lib/resources.ts has one function per data source; src/lib/directus.ts (name kept) is the small Payload client. CMS changes only go live on the next build. An editor triggers one with the "Publish site" button in Payload (it runs the Forgejo workflow); a push to main also builds. See DEPLOY-HETZNER.md.
  • Languages: src/pages/[lang]/… routes enumerate languages where active = true (currently sk, en, hr, pl) via getStaticPaths. / redirects to /sk.
  • Images: no runtime image service. src/lib/image.ts (cdnImage()) records the widths each <img> needs; src/integrations/local-images.mjs generates the .webp files with Sharp into dist/img/ at build.
  • Design tokens: src/styles/tokens.css — CSS custom properties.
  • Custom code: idiomatic reimplementations (CSS marquee, native <details> FAQ, native <dialog> mobile menu, …); trade-offs noted in NOTES.md §2.

Layout

src/lib/          directus.ts · resources.ts · i18n.ts
src/styles/       tokens.css · global.css
src/layouts/      BaseLayout.astro
src/components/    Navbar · Footer · CtaBanner · LanguageSwitcher · MobileMenu
                   Marquee · FaqAccordion · HeroBadge · WhyUsSlider · Rail
                   ApartmentCard · VillaCard · Icon
src/pages/        index.astro (→ /sk) · [lang]/index.astro (Home)