feat: add homepage, content collections, and utils

- Homepage with hero, featured projects, latest posts sections
- Content collections config (blog + projects schemas)
- Date formatting and reading time utilities
- Sample blog post and project for validation
This commit is contained in:
wh-leader
2026-05-11 07:43:04 +02:00
parent 05036766e4
commit 600e9ac3b4
6 changed files with 254 additions and 14 deletions
+7
View File
@@ -0,0 +1,7 @@
export function formatDate(date: Date): string {
return new Intl.DateTimeFormat('es-ES', {
year: 'numeric',
month: 'long',
day: 'numeric',
}).format(date);
}
+6
View File
@@ -0,0 +1,6 @@
export function getReadingTime(content: string): string {
const wordsPerMinute = 200;
const words = content.trim().split(/\s+/).length;
const minutes = Math.ceil(words / wordsPerMinute);
return `${minutes} min lectura`;
}