From a74ebf3367f60467bb609839b34e2e838cb7d37b Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 29 Sep 2019 12:47:44 +0100 Subject: [PATCH] Only show duration if it's not a root page and it's longer than 2 minutes --- layouts/partials/content-details.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/content-details.html b/layouts/partials/content-details.html index c5e1e1b..47a7066 100644 --- a/layouts/partials/content-details.html +++ b/layouts/partials/content-details.html @@ -2,8 +2,10 @@ {{ .Date.Format "2006-01-02" }} {{ end }} -{{ if .ReadingTime }} - {{ .ReadingTime }} minutes +{{ if not .Parent.IsHome }} + {{ if gt .ReadingTime 2 }} + {{ .ReadingTime }} minutes + {{ end }} {{ end }} {{ if .Params.tags }}