feat(web): Optimize SEO (#1260)

This commit is contained in:
Thomas Camlong
2025-04-24 18:22:15 +02:00
committed by GitHub
parent 038e4dc73d
commit 57b0e6a1aa
4 changed files with 933 additions and 67 deletions

View File

@@ -1,45 +1,7 @@
import { HeroSection } from "@/components/hero"
import { RecentlyAddedIcons } from "@/components/recently-added-icons"
import { BASE_URL, REPO_NAME, getDescription, websiteTitle } from "@/constants"
import { REPO_NAME } from "@/constants"
import { getRecentlyAddedIcons, getTotalIcons } from "@/lib/api"
import type { Metadata } from "next"
export async function generateMetadata(): Promise<Metadata> {
const { totalIcons } = await getTotalIcons()
return {
title: websiteTitle,
description: getDescription(totalIcons),
keywords: ["dashboard icons", "service icons", "application icons", "tool icons", "web dashboard", "app directory"],
robots: {
index: true,
follow: true,
},
openGraph: {
title: websiteTitle,
description: getDescription(totalIcons),
type: "website",
url: BASE_URL,
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Dashboard Icons",
},
],
},
twitter: {
title: websiteTitle,
description: getDescription(totalIcons),
card: "summary_large_image",
images: ["/og-image.png"],
},
alternates: {
canonical: BASE_URL,
},
}
}
async function getGitHubStars() {
const response = await fetch(`https://api.github.com/repos/${REPO_NAME}`)