diff --git a/components/BlogStatBox.vue b/components/BlogStatBox.vue index 3753b0a..b00e554 100644 --- a/components/BlogStatBox.vue +++ b/components/BlogStatBox.vue @@ -2,6 +2,7 @@ import dayjs from "dayjs"; import utc from "dayjs/plugin/utc.js"; import type { BlogParsedContent } from "@/shared/types"; +import { calcReadingTime } from "@/shared/readingTime"; dayjs.extend(utc); @@ -26,33 +27,28 @@ const prettyDate = latestDate.format("DD MMM YYYY"); >
- {{ prettyDate }} · {{ latest.readingTime.text }} + {{ prettyDate }} · {{ calcReadingTime(latest).minutes }} min read
- -- {{ latest.description }} … -
diff --git a/components/PostPreviewCard.vue b/components/PostPreviewCard.vue new file mode 100644 index 0000000..5accea2 --- /dev/null +++ b/components/PostPreviewCard.vue @@ -0,0 +1,69 @@ + + + +{{ getPrettyDate(post) }} · {{ descText }}
+- {{ prettyDate }} · {{ latest.readingTime.words }} words + {{ prettyDate }} · {{ calcReadingTime(latest).words.total }} words
- -- {{ latest.description }} ... -
diff --git a/components/Tag.vue b/components/Tag.vue index dbadfb5..e716b09 100644 --- a/components/Tag.vue +++ b/components/Tag.vue @@ -1,11 +1,17 @@- {{ getPrettyDate(story) }} · {{ story.readingTime.text }} -
-{{ story.description }} ...
- -