Add initial project files

This commit is contained in:
Igor Martyniuk
2026-09-01 13:03:41 +03:00
parent 22e111bb44
commit 74cb5b6176
1841 changed files with 242819 additions and 30 deletions
+15
View File
@@ -0,0 +1,15 @@
import type { MetadataRoute } from 'next';
import { getWebRuntimeAPI } from '#web-runtime/api/web-runtime-api';
import { siteUrl } from '#web-runtime/lib/site-url';
import { buildSitemap } from '#web-runtime/lib/sitemap';
import { getPathname } from '#i18n/navigation';
function publicPath(locale: string, path: string): string {
return getPathname({ locale, href: path ? `/${path}` : '/' });
}
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const entries = await getWebRuntimeAPI().listSitemapPages();
return buildSitemap(entries, siteUrl(), publicPath);
}