From 558425fa80cdb823cb6fb064cb8ee97695cff9d7 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sun, 27 Aug 2023 12:11:51 +0530 Subject: [PATCH] Google analytics only enabled for production environment --- _includes/head.html | 3 +- _layouts/default.html | 101 +++++++++++++++++++----------------------- 2 files changed, 48 insertions(+), 56 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index c81f6cb..eb3ffd3 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -102,7 +102,7 @@ }); } - +{% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} +{% endif %} {% unless site.theme_mode %} {% include mode-toggle.html %} diff --git a/_layouts/default.html b/_layouts/default.html index 0946935..0854db1 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -10,73 +10,64 @@ layout: compress {% include lang.html %} {% capture prefer_mode %} - {% if site.theme_mode %} - data-mode="{{ site.theme_mode }}" - {% endif %} +{% if site.theme_mode %} +data-mode="{{ site.theme_mode }}" +{% endif %} {% endcapture %} - {% include head.html %} +{% include head.html %} - - - - + + + {% if jekyll.environment == 'production' and site.google_analytics.id != empty and site.google_analytics.id %} + + + {% endif %} + + {% include sidebar.html lang=lang %} - {% include sidebar.html lang=lang %} - -
-
- {% include topbar.html lang=lang %} - {{ content }} - {% include_cached search-results.html lang=lang %} -
+
+
+ {% include topbar.html lang=lang %} + {{ content }} + {% include_cached search-results.html lang=lang %}
+
- {% include_cached footer.html lang=lang %} + {% include_cached footer.html lang=lang %} -
+
- + - {% if site.pwa.enabled %} - - {% endif %} + {% if site.pwa.enabled %} + + {% endif %} - {% include js-selector.html %} + {% include js-selector.html %} - {% if page.mermaid %} - {% include mermaid.html %} - {% endif %} + {% if page.mermaid %} + {% include mermaid.html %} + {% endif %} - {% include_cached search-loader.html %} - - + {% include_cached search-loader.html %} + + + \ No newline at end of file