Skip to content

Commit a1cd98f

Browse files
committed
feat: use env var for site URL and GitHub token in sitemap
1 parent 6f46062 commit a1cd98f

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

website/app/sitemap.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ async function fetchReleases(): Promise<Release[]> {
1515
"https://api.github.com/repos/nomandhoni-cs/blink-eye/releases",
1616
{
1717
cache: "force-cache",
18-
}
18+
headers: {
19+
Authorization: `Bearer ${process.env.BLINK_EYE_WEBSITE_TOKEN}`,
20+
},
21+
},
1922
);
2023

2124
if (!res.ok) {
@@ -53,7 +56,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
5356
lastModified: new Date().toISOString(),
5457
changeFrequency: "weekly" as const,
5558
priority: 0.8,
56-
}))
59+
})),
5760
);
5861

5962
// Generate release-specific routes
@@ -63,7 +66,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
6366
lastModified: new Date().toISOString(),
6467
changeFrequency: "weekly" as const,
6568
priority: 0.8,
66-
}))
69+
})),
6770
);
6871

6972
// Generate routes for all locales
@@ -73,7 +76,7 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
7376
lastModified: new Date(),
7477
changeFrequency: "weekly" as const,
7578
priority: route === "" ? 1 : 0.9,
76-
}))
79+
})),
7780
);
7881

7982
return [

website/configs/seo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ export const SEO = {
6666
"20 20 20 rule app for windows",
6767
],
6868
thumb: "https://utfs.io/f/93hqarYp4cDdRfdEFOs3IvZkCG1g7rYl8WhFVBbNozK265eA",
69-
url: "https://blinkeye.app",
69+
url: process.env.NEXT_PUBLIC_SITE_URL || "https://blinkeye.app",
7070
twitter: "@blinkeyeapp",
7171
};

0 commit comments

Comments
 (0)