From 038d6623a0c6b4404d1ba7cddfb718acdde38682 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Sun, 17 May 2020 02:13:03 -0700 Subject: [PATCH] Adding the option to turn off Google Analytics & Fix Latest Posts List (#144) * adding option to turn off Google Analytics * fixing the latest posts list --- layouts/index.html | 6 ++++-- layouts/partials/footer_scripts.html | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 8fa2e38..e02c589 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -10,11 +10,13 @@ {{ if isset .Site.Params "latestpostcount" }}
- {{ $nbPosts := len (where .Data.Pages "Section" "blog") }} + {{ $blogPosts := (where .Site.RegularPages "Section" "blog") }} + {{ $nbPosts := len $blogPosts }} {{ if gt $nbPosts 0 }}
Latest posts