feat: basic post structured data for SEO

This commit is contained in:
saicaca committed 2024-04-29 17:27:14 +08:00
1 parent 410902a767
commit 873dbe3189
4 files changed
+22 -5

No files matched your search

+1 -5
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)
}