Skip to content

Commit

Permalink
feat: provice default value for seo title & description
Browse files Browse the repository at this point in the history
  • Loading branch information
farnabaz committed Nov 20, 2024
1 parent aa4614d commit c8d8848
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/content/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,11 @@ export async function parseContent(key: string, content: string, collection: Res
result.rawbody = result.rawbody ?? content
}

if (collectionKeys.includes('seo')) {
result.seo = result.seo || {}
result.seo.title = result.seo.title || result.title
result.seo.description = result.seo.description || result.description
}

return result
}

0 comments on commit c8d8848

Please sign in to comment.