round up from zero minute read time to one minute

Amolith created

Change summary

main.go | 3 +++
1 file changed, 3 insertions(+)

Detailed changes

main.go 🔗

@@ -361,6 +361,9 @@ func getPostInfo(input string) (string, string, string) {
 // Get the read time of the post
 func getReadTime(content string) int {
 	wordCount := len(strings.Fields(content))
+	if wordCount/200 == 0 {
+		return 1
+	}
 	return wordCount / 200
 }