{{ .Title | markdownify }}
+ {{- if not (.Params.hideDate) }} {{- with .Date }}{{ .Format "2006/01/02" }}
diff --git a/layouts/partials/image.html b/layouts/partials/image.html index cfd8d7d..6dc8b1d 100644 --- a/layouts/partials/image.html +++ b/layouts/partials/image.html @@ -15,6 +15,7 @@ Renders an image with the given class, alt, and sizes. {{- $sizesParts := slice }} {{- $len := len $sizes }} +{{- if .image }} {{/* Loop through widths to resize images and build attributes */}} {{- range $index, $width := $sizes }} {{- $resizeSpec := printf "%dx webp q90" $width }} @@ -41,3 +42,4 @@ Renders an image with the given class, alt, and sizes. sizes="{{ delimit $sizesParts ", " }}" alt="{{ $alt }}" > +{{- end }}