diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 320bdab..4f45b81 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,8 +1,9 @@ name: Deploy static content to Pages on: - push: - branches: ["trunk"] + release: + types: [published] + workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: diff --git a/app/[[...slug]]/page.tsx b/app/[[...slug]]/page.tsx index d8bfafd..dfa421e 100644 --- a/app/[[...slug]]/page.tsx +++ b/app/[[...slug]]/page.tsx @@ -8,6 +8,7 @@ import { import { notFound } from "next/navigation"; import defaultMdxComponents from "fumadocs-ui/mdx"; import { getGithubLastEdit } from "fumadocs-core/server"; +import { Metadata } from "next"; export default async function Page(props: { params: Promise<{ slug?: string[] }>; @@ -54,7 +55,7 @@ export async function generateStaticParams() { export async function generateMetadata(props: { params: Promise<{ slug?: string[] }>; -}) { +}): Promise { const params = await props.params; const page = source.getPage(params.slug); if (!page) notFound(); @@ -62,5 +63,34 @@ export async function generateMetadata(props: { return { title: page.data.title, description: page.data.description, + openGraph: { + title: page.data.title, + description: page.data.description, + images: [ + { + url: "/img/shield-social-card.png", + width: 1200, + height: 630, + alt: "Shield", + }, + ], + siteName: "Shield Docs", + locale: "en_US", + }, + twitter: { + card: "summary_large_image", + site: "@shield_auth", + title: page.data.title, + description: page.data.description, + creator: "@MKSingh_Dev", + images: [ + { + url: "/img/shield-social-card.png", + width: 1200, + height: 630, + alt: "Shield", + }, + ], + }, }; } diff --git a/app/layout.tsx b/app/layout.tsx index b699cb6..1e661fb 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,4 +1,3 @@ -import { HomeLayout } from "fumadocs-ui/layouts/home"; import "./global.css"; import { RootProvider } from "fumadocs-ui/provider"; import { Inter } from "next/font/google"; diff --git a/bun.lockb b/bun.lockb index e460597..00c3973 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/logo.tsx b/components/logo.tsx index 55a8b78..32d19ad 100644 --- a/components/logo.tsx +++ b/components/logo.tsx @@ -1,11 +1,11 @@ import Image from "next/image"; const Logo = (): React.ReactNode => ( -
+
shield logo
-
Docs
+
Docs
); diff --git a/package.json b/package.json index f580b7e..ac6318c 100644 --- a/package.json +++ b/package.json @@ -10,16 +10,16 @@ }, "dependencies": { "fumadocs-core": "14.0.2", - "fumadocs-mdx": "11.0.0", + "fumadocs-mdx": "11.1.0", "fumadocs-ui": "14.0.2", "lucide-react": "^0.453.0", - "next": "15.0.0", + "next": "15.0.1", "react": "^18.3.1", "react-dom": "^18.3.1" }, "devDependencies": { - "@types/node": "22.7.8", - "@types/react": "^18.3.11", + "@types/node": "22.8.1", + "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", "typescript": "^5.6.3", "@types/mdx": "^2.0.13",