File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,8 +302,25 @@ export async function generateMetadata(props: {
302302 }
303303 if ( ! page ) notFound ( ) ;
304304
305+ const canonicalPath = page . url . replace ( / ^ \/ e n ( \/ | $ ) / , '/' ) ;
306+
305307 return {
306308 title : page . data . title ,
307309 description : page . data . description ,
310+ alternates : {
311+ canonical : canonicalPath ,
312+ } ,
313+ openGraph : {
314+ title : page . data . title ,
315+ description : page . data . description ,
316+ url : canonicalPath ,
317+ siteName : 'Steel Docs' ,
318+ type : 'article' ,
319+ } ,
320+ twitter : {
321+ card : 'summary' ,
322+ title : page . data . title ,
323+ description : page . data . description ,
324+ } ,
308325 } ;
309326}
Original file line number Diff line number Diff line change 11import './global.css' ;
22import { RootProvider } from 'fumadocs-ui/provider' ;
33import { GeistMono } from 'geist/font/mono' ;
4+ import type { Metadata } from 'next' ;
45import type { ReactNode } from 'react' ;
56import { inter , jetBrainsMono } from '@/fonts' ;
67import { KeyboardShortcutsProvider } from '@/hooks/use-keyboard-shortcuts' ;
78import { QueryProvider } from '@/providers/query-provider' ;
89
10+ export const metadata : Metadata = {
11+ metadataBase : new URL ( 'https://docs.steel.dev' ) ,
12+ alternates : {
13+ types : {
14+ 'text/plain' : '/llms.txt' ,
15+ } ,
16+ } ,
17+ } ;
18+
919export default function RootLayout ( { children } : { children : ReactNode } ) {
1020 return (
1121 < html
1222 lang = "en"
1323 className = { `dark ${ inter . variable } ${ jetBrainsMono . variable } ${ GeistMono . variable } ` }
1424 suppressHydrationWarning
1525 >
16- < head >
17- < link
18- rel = "alternate"
19- type = "text/markdown"
20- href = "/llms.txt"
21- title = "LLM Documentation Index"
22- />
23- < link
24- rel = "alternate"
25- type = "text/markdown"
26- href = "/llms-full.txt"
27- title = "Full LLM Documentation"
28- />
29- </ head >
26+ < head />
3027 < body className = "flex flex-col min-h-screen" >
3128 < QueryProvider >
3229 < KeyboardShortcutsProvider >
You can’t perform that action at this time.
0 commit comments