600e9ac3b4
- 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
6 lines
229 B
TypeScript
6 lines
229 B
TypeScript
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`;
|
|
} |