TASKS-1823 WebManager module

This commit is contained in:
Igor Martyniuk
2026-08-28 08:35:58 +00:00
parent fdb2cf3837
commit c93d8c025b
654 changed files with 26232 additions and 6075 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);
}