This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/app/sitemap.ts
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

59 lines
2.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* sitemap.ts — XML sitemap generation for Novarix Networks
*
* Next.js App Router generates /sitemap.xml automatically from the array
* returned by this default export.
*
* ─── Adding pages ────────────────────────────────────────────────────────
*
* Append an entry for each publicly reachable page:
*
* {
* url: "https://novarixnet.com/services",
* lastModified: new Date("2025-06-01"),
* changeFrequency: "monthly",
* priority: 0.8,
* },
*
* `lastModified` can be a Date object or an ISO 8601 string.
* `priority` is a hint (0.01.0) for search engine crawl budgeting.
*
* ─── Dynamic routes ──────────────────────────────────────────────────────
*
* For blog posts or product pages generated from a CMS, fetch slugs inside
* this function and map them to sitemap entries:
*
* const posts = await fetchPosts();
* return posts.map((p) => ({
* url: `https://novarixnet.com/blog/${p.slug}`,
* lastModified: p.updatedAt,
* changeFrequency: "weekly",
* priority: 0.6,
* }));
*
* ─── Output ──────────────────────────────────────────────────────────────
*
* <?xml version="1.0" encoding="UTF-8"?>
* <urlset xmlns="https://www.sitemaps.org/schemas/sitemap/0.9">
* <url>
* <loc>https://novarixnet.com</loc>
* <lastmod>…</lastmod>
* <changefreq>monthly</changefreq>
* <priority>1</priority>
* </url>
* </urlset>
*/
import type { MetadataRoute } from "next";
export default function sitemap(): MetadataRoute.Sitemap {
return [
{
url: "https://novarixnet.com",
lastModified: new Date(),
changeFrequency: "monthly",
priority: 1,
},
];
}