feat: basic post structured data for SEO

This commit is contained in:
saicaca
2024-04-29 17:04:15 +08:00
parent 410902a767
commit 873dbe3189
4 changed files with 22 additions and 5 deletions

View File

@@ -1,7 +1,3 @@
export function formatDateToYYYYMMDD(date: Date): string {
const year = date.getFullYear()
const month = (date.getMonth() + 1).toString().padStart(2, '0')
const day = date.getDate().toString().padStart(2, '0')
return `${year}-${month}-${day}`
return date.toISOString().substring(0, 10)
}