289c808257
Rebrand the public café-discovery app: directories web/finder→web/koja and docker/finder→docker/koja, plus all service wiring (docker-compose, Caddy subdomain koja.meezi.ir, env vars KOJA_PORT / NEXT_PUBLIC_KOJA_URL, CI workflows) and the app's display name (Koja / کجا). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.3 KiB
TypeScript
50 lines
1.3 KiB
TypeScript
import type { MetadataRoute } from "next";
|
|
import { getAllCafeSlugs } from "@/lib/api";
|
|
|
|
const BASE = process.env.NEXT_PUBLIC_SITE_URL ?? "https://find.meezi.ir";
|
|
const LOCALES = ["fa", "en"];
|
|
|
|
const CITIES = [
|
|
"tehran", "isfahan", "mashhad", "shiraz", "tabriz",
|
|
"karaj", "ahvaz", "qom", "rasht", "kermanshah",
|
|
];
|
|
|
|
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
|
const slugs = await getAllCafeSlugs();
|
|
|
|
const staticPages = LOCALES.flatMap((locale) => [
|
|
{
|
|
url: `${BASE}/${locale}`,
|
|
lastModified: new Date(),
|
|
changeFrequency: "daily" as const,
|
|
priority: 1.0,
|
|
},
|
|
{
|
|
url: `${BASE}/${locale}/search`,
|
|
lastModified: new Date(),
|
|
changeFrequency: "daily" as const,
|
|
priority: 0.8,
|
|
},
|
|
]);
|
|
|
|
const cityPages = LOCALES.flatMap((locale) =>
|
|
CITIES.map((city) => ({
|
|
url: `${BASE}/${locale}/city/${city}`,
|
|
lastModified: new Date(),
|
|
changeFrequency: "weekly" as const,
|
|
priority: 0.7,
|
|
}))
|
|
);
|
|
|
|
const cafePages = LOCALES.flatMap((locale) =>
|
|
slugs.map((slug) => ({
|
|
url: `${BASE}/${locale}/cafe/${slug}`,
|
|
lastModified: new Date(),
|
|
changeFrequency: "weekly" as const,
|
|
priority: 0.9,
|
|
}))
|
|
);
|
|
|
|
return [...staticPages, ...cityPages, ...cafePages];
|
|
}
|