@@ -23,7 +23,11 @@ type RouteParams = {
2323
2424export const dynamic = "force-dynamic" ;
2525
26- function buildKeywords ( articleTitle : string , articleDescription : string , label : string ) {
26+ function buildKeywords (
27+ articleTitle : string ,
28+ articleDescription : string ,
29+ label : string ,
30+ ) {
2731 const stopWords = new Set ( [
2832 "a" ,
2933 "an" ,
@@ -89,7 +93,9 @@ export async function generateMetadata({
8993
9094 const articleUrl = absoluteUrl ( `/posts/${ article . slug } ` ) ;
9195 const articleImage = absoluteUrl ( article . img ) ;
92- const generatedOgImage = absoluteUrl ( `/posts/${ article . slug } /opengraph-image` ) ;
96+ const generatedOgImage = absoluteUrl (
97+ `/posts/${ article . slug } /opengraph-image` ,
98+ ) ;
9399 const authorUrl = article . author ?. slug
94100 ? absoluteUrl ( `/team/${ article . author . slug } ` )
95101 : undefined ;
@@ -172,7 +178,11 @@ export default async function ArticleDetails({
172178 datePublished : article . date . toISOString ( ) ,
173179 dateModified : article . updatedAt . toISOString ( ) ,
174180 articleSection : article . label || undefined ,
175- keywords : buildKeywords ( article . title , article . description , article . label ) ,
181+ keywords : buildKeywords (
182+ article . title ,
183+ article . description ,
184+ article . label ,
185+ ) ,
176186 inLanguage : "en-US" ,
177187 author : {
178188 "@type" : "Person" ,
@@ -219,17 +229,27 @@ export default async function ArticleDetails({
219229 < JsonLd data = { jsonLd } />
220230 < PostNavigation href = "/posts" > POSTS</ PostNavigation >
221231
222- < article className = "grid md:grid-cols-2 gap-6 md:gap-6 pb-6 md:pb-24" >
232+ < article className = "grid md:grid-cols-2 gap-6 md:gap-10 pb-6 md:pb-24 items-start " >
223233 < div >
224234 < h1 className = "text-subtitle" > { article . title } </ h1 >
225- < p className = "mt-4" > { article . description } </ p >
226235 </ div >
227- < div className = "flex flex-col gap-4" >
236+
237+ < div className = "flex flex-col gap-6 md:gap-8" >
238+ < Link
239+ href = { article . topicPath }
240+ className = "px-3 py-2 border border-white rounded-full w-fit h-fit hover:bg-white hover:text-black transition ml-auto"
241+ >
242+ < span className = "uppercase" > { article . label } </ span >
243+ </ Link >
244+ < p > { article . description } </ p >
228245 < div className = "flex flex-col sm:flex-row md:items-center gap-2 sm:gap-6" >
229246 < span className = "flex flex-wrap" >
230- < p className = "font-semibold pr-2" > Team :</ p >
247+ < p className = "font-semibold pr-2" > Author :</ p >
231248 { article . author ?. slug ? (
232- < Link href = { `/team/${ article . author . slug } ` } className = "hover:underline" >
249+ < Link
250+ href = { `/team/${ article . author . slug } ` }
251+ className = "hover:underline"
252+ >
233253 { article . authorName }
234254 </ Link >
235255 ) : (
@@ -246,28 +266,11 @@ export default async function ArticleDetails({
246266 } ) }
247267 </ time >
248268 </ span >
249- < span className = "flex flex-wrap" >
250- < p className = "font-semibold pr-2" > Updated:</ p >
251- < time dateTime = { article . updatedAt . toISOString ( ) } >
252- { article . updatedAt . toLocaleDateString ( "en-US" , {
253- year : "numeric" ,
254- month : "long" ,
255- day : "numeric" ,
256- } ) }
257- </ time >
258- </ span >
259- </ div >
260- < div className = "flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4" >
261- < span className = "flex flex-wrap" >
269+
270+ < span className = "flex flex-wrap items-center" >
262271 < p className = "font-semibold pr-2" > Read:</ p >
263272 < p > { article . read } </ p >
264273 </ span >
265- < Link
266- href = { article . topicPath }
267- className = "px-3 py-2 border border-white rounded-full w-fit h-fit hover:bg-white hover:text-black transition"
268- >
269- < span className = "uppercase" > { article . label } </ span >
270- </ Link >
271274 { article . video ? (
272275 < a
273276 href = { article . video . url }
@@ -303,7 +306,7 @@ export default async function ArticleDetails({
303306 url = { `/team/${ article . author . slug } ` }
304307 linkText = "Check out"
305308 >
306- Team
309+ Author
307310 </ Subheading >
308311 < AuthorCard authorData = { article . author } />
309312 </ div >
@@ -347,7 +350,7 @@ export default async function ArticleDetails({
347350 < p className = "mt-3 mb-12" > { entry . description } </ p >
348351 < div className = "flex flex-wrap gap-4" >
349352 < span className = "flex" >
350- < p className = "font-semibold pr-2" > Team </ p >
353+ < p className = "font-semibold pr-2" > Author </ p >
351354 < p > { entry . authorName } </ p >
352355 </ span >
353356 < span className = "flex" >
0 commit comments