11import type { Metadata } from 'next' ;
22import { Atkinson_Hyperlegible } from 'next/font/google' ;
3+ import { getSiteName } from '@/lib/funcs/site-name' ;
34import Providers from '@/app/components/providers/all' ;
45import { pub } from '@/lib/env' ;
56import NavBar from './components/nav/nav' ;
@@ -11,15 +12,59 @@ const inter = Atkinson_Hyperlegible({
1112 weight : [ '400' , '700' ] ,
1213} ) ;
1314
15+ const title = 'ashgw.io' ;
16+ const description = 'Developer, writer, and modern day philosopher.' ;
17+ const url = new URL ( pub . SITE_URL_PROD ) ;
18+ const kw : string [ ] = [ 'blog' , 'tech' , 'TS' , 'Python' ] ;
19+
20+ const postImageWidth = 1200 ; // in pixels
21+ const postImageHeight = 630 ;
22+ const postImageUrl = `https://via.placeholder.com/${ postImageWidth } x${ postImageHeight } .png/000000/ffffff/?text=${ title } ` ;
23+
1424export const metadata : Metadata = {
15- // TODO: figure out SEO when finished
1625 metadataBase : new URL ( pub . SITE_URL_PROD ) ,
17- title : 'ashgw' ,
18- description : '...' ,
26+ title : {
27+ default : 'Ashgw' ,
28+ template : '%s | Ashgw' ,
29+ } ,
30+ creator : 'Ashref Gwader' ,
31+ keywords : kw ,
32+ description : 'Developer, writer, and modern day philosopher.' ,
33+ openGraph : {
34+ siteName : getSiteName ( pub . SITE_URL_PROD ) || pub . SITE_URL_PROD ,
35+ locale : 'en_US' ,
36+ publishedTime : '2023-12-01T09:15:00-0401' ,
37+ title,
38+ description,
39+ type : 'article' ,
40+ url,
41+ images : [
42+ {
43+ url : postImageUrl ,
44+ width : postImageWidth ,
45+ height : postImageHeight ,
46+ alt : title ,
47+ } ,
48+ ] ,
49+ } ,
1950 robots : {
2051 index : true ,
2152 follow : true ,
53+ googleBot : {
54+ index : true ,
55+ follow : true ,
56+ 'max-video-preview' : - 1 ,
57+ 'max-image-preview' : 'large' ,
58+ 'max-snippet' : - 1 ,
59+ } ,
60+ } ,
61+ twitter : {
62+ card : 'summary_large_image' ,
63+ title,
64+ description,
65+ images : [ postImageUrl ] ,
2266 } ,
67+ category : 'tech' ,
2368} ;
2469
2570export default async function RootLayout ( {
0 commit comments