Skip to content

Commit 3ca397f

Browse files
committed
meta tags improved and deps updated
1 parent a58a835 commit 3ca397f

6 files changed

Lines changed: 40 additions & 10 deletions

File tree

.github/workflows/cd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Deploy static content to Pages
22

33
on:
4-
push:
5-
branches: ["trunk"]
4+
release:
5+
types: [published]
6+
workflow_dispatch:
67

78
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
89
permissions:

app/[[...slug]]/page.tsx

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import { notFound } from "next/navigation";
99
import defaultMdxComponents from "fumadocs-ui/mdx";
1010
import { getGithubLastEdit } from "fumadocs-core/server";
11+
import { Metadata } from "next";
1112

1213
export default async function Page(props: {
1314
params: Promise<{ slug?: string[] }>;
@@ -54,13 +55,42 @@ export async function generateStaticParams() {
5455

5556
export async function generateMetadata(props: {
5657
params: Promise<{ slug?: string[] }>;
57-
}) {
58+
}): Promise<Metadata> {
5859
const params = await props.params;
5960
const page = source.getPage(params.slug);
6061
if (!page) notFound();
6162

6263
return {
6364
title: page.data.title,
6465
description: page.data.description,
66+
openGraph: {
67+
title: page.data.title,
68+
description: page.data.description,
69+
images: [
70+
{
71+
url: "/img/shield-social-card.png",
72+
width: 1200,
73+
height: 630,
74+
alt: "Shield",
75+
},
76+
],
77+
siteName: "Shield Docs",
78+
locale: "en_US",
79+
},
80+
twitter: {
81+
card: "summary_large_image",
82+
site: "@shield_auth",
83+
title: page.data.title,
84+
description: page.data.description,
85+
creator: "@MKSingh_Dev",
86+
images: [
87+
{
88+
url: "/img/shield-social-card.png",
89+
width: 1200,
90+
height: 630,
91+
alt: "Shield",
92+
},
93+
],
94+
},
6595
};
6696
}

app/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { HomeLayout } from "fumadocs-ui/layouts/home";
21
import "./global.css";
32
import { RootProvider } from "fumadocs-ui/provider";
43
import { Inter } from "next/font/google";

bun.lockb

3.98 KB
Binary file not shown.

components/logo.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Image from "next/image";
22

33
const Logo = (): React.ReactNode => (
4-
<div className="w-full flex gap-4">
4+
<div className="w-full py-1 flex gap-4 justify-center">
55
<div className="relative h-16 w-40 flex items-center justify-center">
66
<Image src="/logo.svg" alt="shield logo" fill />
77
</div>
8-
<pre>Docs</pre>
8+
<pre className="pt-2">Docs</pre>
99
</div>
1010
);
1111

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
},
1111
"dependencies": {
1212
"fumadocs-core": "14.0.2",
13-
"fumadocs-mdx": "11.0.0",
13+
"fumadocs-mdx": "11.1.0",
1414
"fumadocs-ui": "14.0.2",
1515
"lucide-react": "^0.453.0",
16-
"next": "15.0.0",
16+
"next": "15.0.1",
1717
"react": "^18.3.1",
1818
"react-dom": "^18.3.1"
1919
},
2020
"devDependencies": {
21-
"@types/node": "22.7.8",
22-
"@types/react": "^18.3.11",
21+
"@types/node": "22.8.1",
22+
"@types/react": "^18.3.12",
2323
"@types/react-dom": "^18.3.1",
2424
"typescript": "^5.6.3",
2525
"@types/mdx": "^2.0.13",

0 commit comments

Comments
 (0)