Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/llms-txt-hub / apps/web/app/layout.tsx |
| Date | Not specified in source |
| Repository | Janady13/llms-txt-hub |
| Revision | e0f4bf978d4df168369c7601d9c5f5ea89e84377 |
| Branch | main |
| Path or archive member | apps/web/app/layout.tsx |
| Original SHA-256 | 8a538627594ab3eb0a51fa5a671d7fbf0ac6dabada9a4f76597064d97f94f105 |
| Git blob SHA | 37a64a5858221434f0fbf6493ab382f2a79b6cf8 |
| Reading-copy SHA-256 | 8a538627594ab3eb0a51fa5a671d7fbf0ac6dabada9a4f76597064d97f94f105 |
Recovered source transcript
Download complete source text ↓74 lines · 2.9 KB
import { ClerkProvider } from '@clerk/nextjs'
import { headers } from 'next/headers'
import type { ReactNode } from 'react'
import '../../../packages/design-system/styles/globals.css'
import { AnalyticsHead, OpenPanelIdentify } from '@thedaviddias/analytics/head'
import { fonts } from '@thedaviddias/design-system/lib/fonts'
import { DesignSystemProvider } from '@thedaviddias/design-system/theme-provider'
import { SentryUserProvider } from '@thedaviddias/observability/providers'
import { getBaseUrl } from '@thedaviddias/utils/get-base-url'
import { AnalyticsTracker } from '@/components/analytics-tracker'
import { CSRFProvider } from '@/components/csrf-provider'
import { Footer } from '@/components/layout/footer'
import { Header } from '@/components/layout/header'
import { BackToTop } from '@/components/ui/back-to-top'
import { FavoritesProvider } from '@/contexts/favorites-context'
export const metadata: import('next').Metadata = {
title: {
default: 'llms.txt Hub - Directory of AI-Ready Documentation',
template: '%s | llms.txt Hub'
},
description:
'The largest directory of websites implementing the llms.txt standard. Find AI-ready documentation, browse llms.txt examples, and learn how to create your own llms.txt file.',
metadataBase: new URL(getBaseUrl())
}
type RootLayoutProps = {
children: ReactNode
}
export default async function RootLayout({ children }: RootLayoutProps) {
const requestHeaders = await headers()
const nonce = requestHeaders.get('x-nonce') ?? undefined
const pathname = requestHeaders.get('x-pathname') ?? ''
const isExtensionRoute = pathname.startsWith('/extension')
const showSiteChrome = !isExtensionRoute
return (
<ClerkProvider signInUrl="/login" signUpUrl="/login" signInFallbackRedirectUrl="/">
<html lang="en" suppressHydrationWarning>
<head>
<AnalyticsHead
openPanelClientId={process.env.NEXT_PUBLIC_OPENPANEL_CLIENT_ID}
nonce={nonce}
/>
<link
rel="alternate"
type="application/feed+json"
title="llms.txt Hub - New Websites"
href="/rss.xml"
/>
</head>
<body className={fonts}>
<DesignSystemProvider nonce={nonce}>
<SentryUserProvider>
<FavoritesProvider>
<AnalyticsTracker />
<OpenPanelIdentify />
{!isExtensionRoute && <CSRFProvider />}
<div className="flex min-h-screen flex-col">
{showSiteChrome && <Header />}
<main className="flex flex-1 flex-col">{children}</main>
{showSiteChrome && <Footer />}
</div>
{showSiteChrome && <BackToTop />}
</FavoritesProvider>
</SentryUserProvider>
</DesignSystemProvider>
</body>
</html>
</ClerkProvider>
)
}