done landing page

This commit is contained in:
2025-11-10 17:10:34 +05:30
parent 3852d46661
commit 483515e163
105 changed files with 3529 additions and 104 deletions

46
app/sitemap.xml/route.ts Normal file
View File

@@ -0,0 +1,46 @@
// app/sitemap/route.ts
interface SitemapPage {
loc: string;
lastmod: string;
}
export const GET = async () => {
const BASE_URL = "https://trees.falktron.com";
const useCases = [
"forestry",
"research",
"agriculture",
"cities-communities",
];
const pages: SitemapPage[] = [
{ loc: `${BASE_URL}/`, lastmod: new Date().toISOString().split("T")[0] },
...useCases.map((slug) => ({
loc: `${BASE_URL}/use-cases/${slug}`,
lastmod: new Date().toISOString().split("T")[0],
})),
];
const xml = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
${pages
.map(
(page) => `
<url>
<loc>${page.loc}</loc>
<lastmod>${page.lastmod}</lastmod>
</url>`
)
.join("")}
</urlset>`;
return new Response(xml, {
status: 200,
headers: {
"Content-Type": "application/xml",
"Cache-Control": "public, s-maxage=86400, stale-while-revalidate=3600",
},
});
};