From 684cb2160fc84a75e17c5d423c000dc94487839e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Tue, 20 Oct 2020 18:38:29 +0530 Subject: [PATCH] layouts: post_meta as partial --- layouts/_default/archives.html | 8 ++------ layouts/_default/list.html | 6 +----- layouts/_default/single.html | 6 +----- layouts/partials/post_meta.html | 5 +++++ 4 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 layouts/partials/post_meta.html diff --git a/layouts/_default/archives.html b/layouts/_default/archives.html index e2e6993a..b63460ba 100644 --- a/layouts/_default/archives.html +++ b/layouts/_default/archives.html @@ -22,11 +22,7 @@ {{- .Title | markdownify }}
- - {{- if $.Site.Params.ShowReadingTime }} ·  - {{- $default_txt := print .ReadingTime " " "min" }} - {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} - {{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }} + {{- partial "post_meta.html" . -}}
@@ -39,4 +35,4 @@ {{- end }} {{- end }} -{{- end }}{{/* end main */}} \ No newline at end of file +{{- end }}{{/* end main */}} diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 3596a931..dad1d3ce 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -44,11 +44,7 @@ {{- end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 20c3bc93..b13fb74a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -8,11 +8,7 @@ {{- if .Params.hideMeta }}{{ else }}
- - {{- if $.Site.Params.ShowReadingTime -}} ·  - {{- $default_txt := print .ReadingTime " " "min" }} - {{- i18n "read_time" .ReadingTime | default $default_txt }}{{ end }} - {{- if or .Params.author .Site.Params.author }} · {{- .Params.author | default .Site.Params.author }}{{ end }} + {{- partial "post_meta.html" . -}} {{- if .IsTranslated -}} |