Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/website/app/api/og/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const getGoogleFontUrl = (fontFamily: string, weight: number) =>
const fetchFont = async (fontFamily: string, weight: number) => {
const cssUrl = getGoogleFontUrl(fontFamily, weight);
const cssResponse = await fetch(cssUrl);
if (!cssResponse.ok) {
throw new Error(`Failed to fetch font CSS: ${cssResponse.status}`);
}
const cssText = await cssResponse.text();

const fontUrlMatch = cssText.match(/src: url\(([^)]+)\)/);
Expand All @@ -20,6 +23,9 @@ const fetchFont = async (fontFamily: string, weight: number) => {

const fontUrl = fontUrlMatch[1];
const fontResponse = await fetch(fontUrl);
if (!fontResponse.ok) {
throw new Error(`Failed to fetch font: ${fontResponse.status}`);
}
return fontResponse.arrayBuffer();
};

Expand Down
1 change: 0 additions & 1 deletion packages/website/app/blog/agent/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ const AgentPage = () => {
with the agents that exist. If your tool has a CLI or an API, you
can add a provider.
</p>
<p>If your tool has a CLI or an API, you can add a provider.</p>
</div>

<div className="flex flex-col gap-4 mt-8">
Expand Down
10 changes: 7 additions & 3 deletions packages/website/app/changelog/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ export const metadata: Metadata = {
};

const getChangelog = () => {
const changelogPath = join(process.cwd(), "..", "react-grab", "CHANGELOG.md");
const content = readFileSync(changelogPath, "utf-8");
return parseChangelog(content);
try {
const changelogPath = join(process.cwd(), "..", "react-grab", "CHANGELOG.md");
const content = readFileSync(changelogPath, "utf-8");
return parseChangelog(content);
} catch {
return [];
}
};

const ChangelogPage = () => {
Expand Down
Loading