diff --git a/src/components/snippets/PostMetadataSnippet.astro b/src/components/snippets/PostMetadataSnippet.astro new file mode 100644 index 0000000..61173d9 --- /dev/null +++ b/src/components/snippets/PostMetadataSnippet.astro @@ -0,0 +1,60 @@ +--- +import getReadingTime from 'reading-time'; + +import type { Post } from '@lib/directusTypes'; + +import Logo from '@components/images/Logo.astro'; +import { formatShortDate } from '@support/time'; +import { getDirectusImageURL } from '@/support/url'; + +interface Props { + post: Post; +} + +const { post } = Astro.props; + +const readingTime = getReadingTime(post.content || ''); +--- + +