Files
hanzo.ai/app/(marketing)/oss/[org]/page.tsx

39 lines
1.0 KiB
TypeScript

import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import { getAllOrgs, findOrg } from '@/lib/oss'
import { OrgView } from './OrgView'
import { pageMeta } from '@/lib/page-meta'
export function generateStaticParams() {
const orgs = getAllOrgs()
return orgs.map((o) => ({ org: o.slug }))
}
export async function generateMetadata({
params,
}: {
params: Promise<{ org: string }>
}): Promise<Metadata> {
const { org } = await params
const item = findOrg(org)
const title = item ? `${item.title} — Hanzo Open Source` : `${org} — Hanzo Open Source`
const description = item
? `${item.description} Explore repositories, commit velocity, and source code across git.hanzo.ai and mirrors.`
: `Explore ${org} open source repositories and activity on git.hanzo.ai and GitHub mirrors.`
return pageMeta({
title,
description,
path: `/oss/${org}`,
})
}
export default async function Page({
params,
}: {
params: Promise<{ org: string }>
}) {
const { org } = await params
return <OrgView orgSlug={org} />
}