diff --git a/app/layout.tsx b/app/layout.tsx index 0f0fbd37..21002def 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -46,7 +46,21 @@ export const metadata = { ], metadataBase: new URL("https://www.codu.co"), openGraph: { - images: "/images/og/home-og.png", + title: "Codú - The Web Developer Community", + description: + "A free network and community for web developers. Learn and grow together.", + url: "https://www.codu.co", + siteName: "Codú", + images: [ + { + url: "https://www.codu.co/images/og/home-og.png", + width: 1200, + height: 630, + alt: "Codú Community", + }, + ], + locale: "en_US", + type: "website", }, }; diff --git a/app/robots.ts b/app/robots.ts index 5911a1e8..69f1f9ff 100644 --- a/app/robots.ts +++ b/app/robots.ts @@ -15,7 +15,8 @@ export default function robots(): MetadataRoute.Robots { "/notifications/", "/create/", "/my-posts/", - "/hub/", // This should be crawled when completed + "/hub/", + "/api/og", ], }, sitemap: "https://www.codu.co/sitemap.xml", diff --git a/app/sitemap.ts b/app/sitemap.ts index 05ee3c0e..73078690 100644 --- a/app/sitemap.ts +++ b/app/sitemap.ts @@ -38,7 +38,7 @@ export default async function sitemap(): Promise { })); // Shape and connect all the data - const data = [ + const allRoutes = [ { url: BASE_URL, lastModified: new Date(), @@ -46,14 +46,14 @@ export default async function sitemap(): Promise { ...routes, ...articles, ...users, - ]; + ].filter((route) => !route.url.includes("/api/og")); // Filter out OG routes // Capture data as sitemap has been inconsistent and want to test on dev Sentry.captureMessage( - `${JSON.stringify(data)}; Routes Count = ${ + `${JSON.stringify(allRoutes)}; Routes Count = ${ routes.length }, Articles Count = ${articles.length}, Users Count = ${users.length}`, ); - return data; + return allRoutes; }