switch to Astro

This commit is contained in:
2024-05-03 22:49:29 +02:00
parent 0aa328cc09
commit 4405754d1d
70 changed files with 9077 additions and 825 deletions
+14
View File
@@ -0,0 +1,14 @@
import readingTime from 'reading-time'
type Post = {
title: string
file: string
rawContent: () => string
}
export default function getPostData(post: Post) {
return {
slug: post.file.split('/').pop().split('.').shift(),
readingTime: readingTime(post.rawContent()).text,
}
}