feat: CI/CD pipeline + Learning/Medicine/Travel services
- Add Gitea Actions workflow for automated build & deploy - Add K8s manifests: webui, travel-svc, medicine-svc, sandbox-svc - Update kustomization for localhost:5000 registry - Add ingress for gooseek.ru and api.gooseek.ru - Learning cabinet with onboarding, courses, sandbox integration - Medicine service with symptom analysis and doctor matching - Travel service with itinerary planning - Server setup scripts (NVIDIA/CUDA, K3s, Gitea runner) Made-with: Cursor
This commit is contained in:
40
backend/webui/src/app/sitemap.ts
Normal file
40
backend/webui/src/app/sitemap.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import type { MetadataRoute } from 'next';
|
||||
|
||||
const BASE_URL = 'https://gooseek.ru';
|
||||
|
||||
const ALL_APP_ROUTES = [
|
||||
'/discover',
|
||||
'/spaces',
|
||||
'/history',
|
||||
'/travel',
|
||||
'/medicine',
|
||||
'/finance',
|
||||
'/learning',
|
||||
];
|
||||
|
||||
const ALWAYS_IN_SITEMAP = ['/', '/login', '/register'];
|
||||
|
||||
function getEnabledAppRoutes(): string[] {
|
||||
const raw = process.env.NEXT_PUBLIC_ENABLED_ROUTES || '';
|
||||
if (!raw.trim()) return ALL_APP_ROUTES;
|
||||
|
||||
const enabled = new Set(
|
||||
raw
|
||||
.split(',')
|
||||
.map((r) => r.trim())
|
||||
.filter((r) => r.startsWith('/')),
|
||||
);
|
||||
|
||||
return ALL_APP_ROUTES.filter((r) => enabled.has(r));
|
||||
}
|
||||
|
||||
export default function sitemap(): MetadataRoute.Sitemap {
|
||||
const routes = [...ALWAYS_IN_SITEMAP, ...getEnabledAppRoutes()];
|
||||
|
||||
return routes.map((route) => ({
|
||||
url: `${BASE_URL}${route}`,
|
||||
lastModified: new Date(),
|
||||
changeFrequency: route === '/' ? 'daily' : 'weekly',
|
||||
priority: route === '/' ? 1.0 : 0.7,
|
||||
}));
|
||||
}
|
||||
Reference in New Issue
Block a user