4 Commits

Author SHA1 Message Date
Renovate Bot
f956ce3d77 Update dependency next-themes to ^0.4.0 2024-11-04 03:05:45 +00:00
5acb6a4f81 Merge pull request 'Update dependency eslint-config-next to v15' (#8) from renovate/eslint-config-next-15.x into master
All checks were successful
Deploy & Publish Image / deploy (ubuntu-latest, 2.44.0) (push) Successful in 4m44s
Reviewed-on: #8
2024-10-22 12:56:57 -07:00
Renovate Bot
7b7a3cf2a0 Update dependency eslint-config-next to v15 2024-10-21 19:05:22 +00:00
ee25889139 small bug fix
All checks were successful
Deploy & Publish Image / deploy (ubuntu-latest, 2.44.0) (push) Successful in 3m25s
Took 8 minutes
2024-10-14 00:42:15 -04:00
3 changed files with 13 additions and 12 deletions

BIN
bun.lockb

Binary file not shown.

View File

@ -28,7 +28,7 @@
"lucide-react": "^0.452.0", "lucide-react": "^0.452.0",
"luxon": "^3.5.0", "luxon": "^3.5.0",
"next": "^15.0.0-canary.179", "next": "^15.0.0-canary.179",
"next-themes": "^0.3.0", "next-themes": "^0.4.0",
"react": "^19.0.0-rc-1460d67c-20241003", "react": "^19.0.0-rc-1460d67c-20241003",
"react-dom": "^19.0.0-rc-1460d67c-20241003", "react-dom": "^19.0.0-rc-1460d67c-20241003",
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
@ -43,7 +43,7 @@
"@types/react": "^18", "@types/react": "^18",
"@types/react-dom": "^18", "@types/react-dom": "^18",
"eslint": "^8", "eslint": "^8",
"eslint-config-next": "14.2.15", "eslint-config-next": "15.0.0",
"postcss": "^8", "postcss": "^8",
"tailwindcss": "^3.4.1", "tailwindcss": "^3.4.1",
"typescript": "^5" "typescript": "^5"

View File

@ -100,18 +100,19 @@ export const generateMetadata = async ({
}): Promise<Metadata | undefined> => { }): Promise<Metadata | undefined> => {
const slug: string = (((await params).slug as string[]) || undefined)?.join( const slug: string = (((await params).slug as string[]) || undefined)?.join(
"/" "/"
); // The slug of the content );
if (slug) { if (slug) {
const content: DocsContentMetadata | undefined = ( const pages: DocsContentMetadata[] = await getDocsContent();
await getDocsContent() const decodedSlug: string = decodeURIComponent(slug || "");
).find( const page: DocsContentMetadata | undefined = pages.find(
(metadata: DocsContentMetadata): boolean => metadata.slug === slug (metadata: DocsContentMetadata): boolean =>
); // Get the content based on the provided slug metadata.slug === (decodedSlug || pages[0].slug)
if (content) { );
if (page) {
return Embed({ return Embed({
title: content.title, title: page.title,
description: content.summary, description: page.summary,
thumbnail: config.ogApiUrl.replace("{title}", content.title), thumbnail: config.ogApiUrl.replace("{title}", page.title),
}); });
} }
} }