Juozas Auto
Static Astro website for a small Lithuanian used-car seller at auto.juozas.lt.
Commands
npm install
npm run dev
npm test
npm run build
npm run start
Add A New Car
- Create a folder for photos:
src/content/cars/_photos/<make-model-year-city>/. - Add photos named
01.jpg,02.jpg, and so on. Use real car photos, landscape crop preferred. Astro will generate optimized AVIF output during build. - Create
src/content/cars/<make-model-year-city>.md. - Use lowercase ASCII slugs, for example
skoda-octavia-2020-siauliai.md. - Add frontmatter matching
src/content/config.ts, then write the Lithuanian description below it. - Run
npm run buildbefore publishing.
Example photo reference:
photos:
- ./_photos/skoda-octavia-2020-siauliai/01.jpg
- ./_photos/skoda-octavia-2020-siauliai/02.jpg
Mark A Car As Sold
Open the car markdown file and set:
sold: true
Sold cars are hidden by default. To show a sold section on the homepage, set showSoldCars: true in src/site.ts.
Meta Pixel
Set PUBLIC_META_PIXEL_ID in Coolify or Vercel environment variables. META_PIXEL_ID is also supported for build-time compatibility. Leave both empty locally if the pixel should not load.
Tracking setup:
PageViewfires on every route with a uniqueeventIDand page context.- Phone and WhatsApp buttons fire
Contactwithcontent_name,content_ids,contact_channel,currency, andvaluewhen listing data is available. - The sell-car form fires
Leadon submit when a form endpoint is configured. - Events also push to
window.dataLayerfor future Google Tag Manager or debugging. - A
<noscript>fallback is included forPageView.
For Meta Conversions API, set PUBLIC_META_CAPI_ENDPOINT to a separate server-side endpoint or worker. The browser sends CAPI-ready payloads with matching event_id, _fbp, _fbc, user agent, source URL, and custom data. Keep Meta access tokens server-side only. src/pages/api/meta-capi.ts is a static explanatory stub because this site intentionally builds as static output.
Contact Form Endpoint
Set PUBLIC_FORMSPREE_ENDPOINT in Coolify or Vercel when the Formspree form is ready. Until then, the form is visible but disabled so visitors use phone or WhatsApp instead of submitting to a placeholder endpoint.
Deploy To Coolify With Nixpacks
The repository includes nixpacks.toml for Coolify.
Coolify settings:
- Build pack: Nixpacks.
- Install command: handled by
nixpacks.tomlasnpm ci. - Build command: handled by
nixpacks.tomlasnpm run build. - Start command: handled by
nixpacks.tomlasnpm run start. - Port: Coolify should provide
PORT; the app falls back to4321.
Recommended Coolify environment variables:
PUBLIC_META_PIXEL_ID=<your-pixel-id>
PUBLIC_META_CAPI_ENDPOINT=<optional-server-side-capi-endpoint>
PUBLIC_FORMSPREE_ENDPOINT=<optional-formspree-endpoint>
Deploy To Vercel
- Import the repository into Vercel.
- Use the default framework detection for Astro.
- Build command:
npm run build. - Output directory:
dist. - Add
PUBLIC_META_PIXEL_IDif needed. - Deploy.
Domain Setup
In Vercel, add auto.juozas.lt under Project Settings, Domains. Then point the DNS record for auto.juozas.lt to the value Vercel provides.
Example Listings
The repository includes three sample listings:
bmw-320d-2018-vilniusvw-passat-2016-kaunastoyota-rav4-2020-vilnius
Sample photos are Unsplash placeholders and should be replaced with real vehicle photography before launch.