mirror of
https://github.com/hanzo-apps/hanzo.ai.git
synced 2026-10-30 14:58:08 +00:00
34 lines
982 B
TypeScript
34 lines
982 B
TypeScript
import type { Metadata } from 'next'
|
|
import { getAllStaticRepos, getRepoDetail } from '@/lib/oss'
|
|
import { RepoView } from './RepoView'
|
|
import { pageMeta } from '@/lib/page-meta'
|
|
|
|
export function generateStaticParams() {
|
|
const items = getAllStaticRepos()
|
|
return items.map((item) => ({ org: item.org, repo: item.repo }))
|
|
}
|
|
|
|
export async function generateMetadata({
|
|
params,
|
|
}: {
|
|
params: Promise<{ org: string; repo: string }>
|
|
}): Promise<Metadata> {
|
|
const { org, repo } = await params
|
|
const detail = getRepoDetail(org, repo)
|
|
|
|
return pageMeta({
|
|
title: `${detail.org}/${detail.name} — Hanzo Open Source`,
|
|
description: `${detail.description} Source code, commit velocity, and deployment on git.hanzo.ai and GitHub mirrors.`,
|
|
path: `/oss/${org}/${repo}`,
|
|
})
|
|
}
|
|
|
|
export default async function Page({
|
|
params,
|
|
}: {
|
|
params: Promise<{ org: string; repo: string }>
|
|
}) {
|
|
const { org, repo } = await params
|
|
return <RepoView orgSlug={org} repoSlug={repo} />
|
|
}
|