Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/app/u/[slug]/metadata.ts |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/app/u/[slug]/metadata.ts |
| Original SHA-256 | 3c88b6855f08660a5a94f06d3555adb7ec53e7e931ee1c24c2fc4c645cedeaad |
| Git blob SHA | c454d3f0080d3b421e2f251bbf016d1ffd300a18 |
| Reading-copy SHA-256 | 3c88b6855f08660a5a94f06d3555adb7ec53e7e931ee1c24c2fc4c645cedeaad |
Recovered source transcript
Download complete source text ↓37 lines · 1.1 KB
import type { Metadata } from 'next'
interface GenerateMetadataProps {
params: {
slug: string
}
}
/**
* Generate metadata for a user profile page
*
* @param props - Route parameters containing the user slug
* @returns Metadata object with noindex directive for profile pages
*/
export async function generateMetadata({ params }: GenerateMetadataProps): Promise<Metadata> {
// Extract name from slug (before the last dash and ID)
const namePart = params.slug.replace(/-[a-zA-Z0-9]{5}$/, '').replace(/-/g, ' ')
const displayName = namePart
.split(' ')
.map(word => word.charAt(0).toUpperCase() + word.slice(1))
.join(' ')
return {
title: `${displayName} | llms.txt hub`,
description: `View ${displayName}'s profile on llms.txt hub. Discover their submitted llms.txt files and contributions to the community.`,
openGraph: {
title: `${displayName} | llms.txt hub`,
description: `View ${displayName}'s profile on llms.txt hub`,
type: 'profile'
},
robots: {
index: false,
follow: true
}
}
}