Files
auto.juozas.lt/README.md
2026-05-02 22:32:02 +00:00

73 lines
2.2 KiB
Markdown

# Juozas Auto
Static Astro website for a small Lithuanian used-car seller at `auto.juozas.lt`.
## Commands
```sh
npm install
npm run dev
npm test
npm run build
```
## Add A New Car
1. Create a folder for photos: `src/content/cars/_photos/<make-model-year-city>/`.
2. 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.
3. Create `src/content/cars/<make-model-year-city>.md`.
4. Use lowercase ASCII slugs, for example `skoda-octavia-2020-siauliai.md`.
5. Add frontmatter matching `src/content/config.ts`, then write the Lithuanian description below it.
6. Run `npm run build` before publishing.
Example photo reference:
```yaml
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:
```yaml
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 `META_PIXEL_ID` in your Vercel environment variables. Leave it empty locally if the pixel should not load.
Phone and WhatsApp buttons fire a `Contact` event when the pixel is configured. `src/pages/api/meta-capi.ts` is only a static stub for a future server-side Conversions API function.
## Contact Form Endpoint
Set `PUBLIC_FORMSPREE_ENDPOINT` in 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 Vercel
1. Import the repository into Vercel.
2. Use the default framework detection for Astro.
3. Build command: `npm run build`.
4. Output directory: `dist`.
5. Add `META_PIXEL_ID` if needed.
6. 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-vilnius`
- `vw-passat-2016-kaunas`
- `toyota-rav4-2020-vilnius`
Sample photos are Unsplash placeholders and should be replaced with real vehicle photography before launch.