From 1af54bd807987d5d7000c039e5409bacd3378283 Mon Sep 17 00:00:00 2001 From: Guillermo Guerrero Date: Fri, 30 Sep 2022 15:17:48 +0200 Subject: Not fail when folders doesn't exist. (#371) --- layouts/partials/carousel.html | 2 ++ layouts/partials/clients.html | 2 ++ layouts/partials/features.html | 2 ++ layouts/partials/testimonials.html | 2 ++ 4 files changed, 8 insertions(+) diff --git a/layouts/partials/carousel.html b/layouts/partials/carousel.html index 5d0e42b..e3b25c5 100644 --- a/layouts/partials/carousel.html +++ b/layouts/partials/carousel.html @@ -1,4 +1,5 @@ {{ if default true .Site.Params.CarouselHomepage.enable }} +{{ if isset .Site.Data "carousel" }} {{ if gt (len .Site.Data.carousel) 0 }}
{{ end }} {{ end }} +{{ end }} diff --git a/layouts/partials/clients.html b/layouts/partials/clients.html index 00583f3..3608e5e 100644 --- a/layouts/partials/clients.html +++ b/layouts/partials/clients.html @@ -1,5 +1,6 @@ {{ if isset .Site.Params "clients" }} {{ if .Site.Params.clients.enable }} +{{ if isset .Site.Data "clients" }} {{ if gt (len .Site.Data.clients) 0 }}
@@ -38,3 +39,4 @@ {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/layouts/partials/features.html b/layouts/partials/features.html index ea73ac5..d370d3e 100644 --- a/layouts/partials/features.html +++ b/layouts/partials/features.html @@ -1,5 +1,6 @@ {{ if isset .Site.Params "features" }} {{ if .Site.Params.features.enable }} +{{ if isset .Site.Data "features" }} {{ if gt (len .Site.Data.features) 0 }}
@@ -44,3 +45,4 @@ {{ end }} {{ end }} {{ end }} +{{ end }} diff --git a/layouts/partials/testimonials.html b/layouts/partials/testimonials.html index a14b3b6..c6af782 100644 --- a/layouts/partials/testimonials.html +++ b/layouts/partials/testimonials.html @@ -1,5 +1,6 @@ {{ if isset .Site.Params "testimonials" }} {{ if .Site.Params.testimonials.enable }} +{{ if isset .Site.Data "testimonials" }} {{ if gt (len .Site.Data.testimonials) 0 }}
@@ -51,3 +52,4 @@ {{ end }} {{ end }} {{ end }} +{{ end }} -- cgit v1.2.3