Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix: update site name in Open Graph metadata and enhance layout for image generation

Andrejbfbad94613b7
diff --git a/apps/docs/app/docs-og/[...slug]/route.ts b/apps/docs/app/docs-og/[...slug]/route.ts
index c52bfd176..b699414da 100644
--- a/apps/docs/app/docs-og/[...slug]/route.ts
+++ b/apps/docs/app/docs-og/[...slug]/route.ts
@@ -14,7 +14,7 @@ export async function GET(
primaryTextColor: "rgb(240,240,240)",
title: page.data.title,
description: page.data.description,
- site: "https://kaneo.app",
+ site: "Kaneo",
});
}
diff --git a/apps/docs/lib/og.tsx b/apps/docs/lib/og.tsx
index 76ff5d241..2e29c2eca 100644
--- a/apps/docs/lib/og.tsx
+++ b/apps/docs/lib/og.tsx
@@ -1,4 +1,4 @@
-import { ImageResponse } from "next/dist/compiled/@vercel/og";
+import { ImageResponse } from "next/og";
import type { ImageResponseOptions } from "next/dist/compiled/@vercel/og/types";
import type { ReactElement, ReactNode } from "react";
@@ -21,6 +21,9 @@ export function generateOgImage(options: GenerateProps & ImageResponseOptions) {
{
width: 1200,
height: 630,
+ headers: new Headers({
+ path: "/docs-og",
+ }),
...rest,
},
);
@@ -111,7 +114,14 @@ function generate(options: GenerateProps): ReactElement {
</div>
{/* Content */}
- <div style={{ zIndex: 10, maxWidth: "80%" }}>
+ <div
+ style={{
+ zIndex: 10,
+ maxWidth: "80%",
+ display: "flex",
+ flexDirection: "column",
+ }}
+ >
<h1
style={{
fontSize: "64px",