From 4eb44cc94c15d975002a575d23934d688932b273 Mon Sep 17 00:00:00 2001 From: Emiliano Tortorella Date: Fri, 18 Jan 2019 20:46:09 -0500 Subject: [PATCH] Added a partial for the date in spanish and added it on the summary and posts. --- layouts/_default/single.html | 6 +++--- layouts/partials/date.html | 7 +++++++ layouts/partials/summary-with-image.html | 5 +++-- layouts/post/summary-with-image.html | 1 + 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 layouts/partials/date.html diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7760642..6bff6e0 100755 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -20,9 +20,9 @@ {{- .Title -}} {{/* Hugo uses Go's date formatting is set by example. Here are two formats */}} - + + {{ partial "date.html" . }} + {{/* Show "reading time" and "word count" but only if one of the following are true: 1) A global config `params` value is set `show_reading_time = true` diff --git a/layouts/partials/date.html b/layouts/partials/date.html new file mode 100644 index 0000000..71b4bb3 --- /dev/null +++ b/layouts/partials/date.html @@ -0,0 +1,7 @@ + + diff --git a/layouts/partials/summary-with-image.html b/layouts/partials/summary-with-image.html index 68ddc04..d835325 100644 --- a/layouts/partials/summary-with-image.html +++ b/layouts/partials/summary-with-image.html @@ -1,6 +1,6 @@ {{ $featured_image := .Params.featured_image }}
-
+
{{ if .Params.featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} @@ -12,11 +12,12 @@
{{ end }}
-

+

{{ .Title }}

+ {{ partial "date.html" . }} diff --git a/layouts/post/summary-with-image.html b/layouts/post/summary-with-image.html index d72cb35..2112f0d 100644 --- a/layouts/post/summary-with-image.html +++ b/layouts/post/summary-with-image.html @@ -8,6 +8,7 @@ {{ end }}

{{ .Title }}

+ {{ partial "date.html" . }}
{{ .Summary }}