mirror of
https://github.com/walkxcode/dashboard-icons.git
synced 2025-11-10 13:38:58 +01:00
- Update UI with refined rose-themed styling throughout the site - Add mobile-responsive improvements to header and hero sections - Create new 'Recently Added Icons' component with animated cards - Improve icon details view with better visual hierarchy and theme indicators - Implement better hover effects and transitions for interactive elements - Add mobile menu for better navigation on smaller screens - Update license notice wording - Remove grid background in favor of refined blur effects
43 lines
1.2 KiB
TypeScript
43 lines
1.2 KiB
TypeScript
import { BASE_URL, WEB_URL } from "@/constants"
|
|
import { getAllIcons } from "@/lib/api"
|
|
import type { MetadataRoute } from "next"
|
|
|
|
export const dynamic = "force-static"
|
|
|
|
// Helper function to format dates as YYYY-MM-DD
|
|
const formatDate = (date: Date): string => {
|
|
// Format to YYYY-MM-DD
|
|
return date.toISOString().split("T")[0]
|
|
}
|
|
|
|
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
|
const iconsData = await getAllIcons()
|
|
return [
|
|
{
|
|
url: WEB_URL,
|
|
lastModified: formatDate(new Date()),
|
|
changeFrequency: "yearly",
|
|
priority: 1,
|
|
},
|
|
{
|
|
url: `${WEB_URL}/icons`,
|
|
lastModified: formatDate(new Date()),
|
|
changeFrequency: "daily",
|
|
priority: 1,
|
|
images: [`${WEB_URL}/icons/icon.png`],
|
|
},
|
|
...Object.keys(iconsData).map((iconName) => ({
|
|
url: `${WEB_URL}/icons/${iconName}`,
|
|
lastModified: formatDate(new Date(iconsData[iconName].update.timestamp)),
|
|
changeFrequency: "yearly" as const,
|
|
priority: 0.8,
|
|
images: [
|
|
`${BASE_URL}/png/${iconName}.png`,
|
|
// SVG is conditional if it exists
|
|
iconsData[iconName].base === "svg" ? `${BASE_URL}/svg/${iconName}.svg` : null,
|
|
`${BASE_URL}/webp/${iconName}.webp`,
|
|
].filter(Boolean) as string[],
|
|
})),
|
|
]
|
|
}
|