From a01c9dd1840f6e377d6f9cde3615d477848b98e0 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sun, 27 Aug 2023 12:07:58 +0530 Subject: [PATCH 1/3] environment setup for uat and prod --- _config-prod.yml | 8 ++++++++ _config-uat.yml | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/_config-prod.yml b/_config-prod.yml index 39be466..b4f1d8a 100644 --- a/_config-prod.yml +++ b/_config-prod.yml @@ -3,6 +3,14 @@ id: 'blog' url: "https://bangararaju.kottedi.in" +assets: + self_host: + enabled: true # boolean, keep empty means false + # specify the Jekyll environment, empty means both + # only works if `assets.self_host.enabled` is 'true' + env: production # [development|production] + + show_drafts: false future: false diff --git a/_config-uat.yml b/_config-uat.yml index 25c4c1d..318de4b 100644 --- a/_config-uat.yml +++ b/_config-uat.yml @@ -3,6 +3,13 @@ id: 'blog-uat' url: "https://bangararaju-uat.kottedi.in" +assets: + self_host: + enabled: true # boolean, keep empty means false + # specify the Jekyll environment, empty means both + # only works if `assets.self_host.enabled` is 'true' + env: development # [development|production] + show_drafts: true future: true From 558425fa80cdb823cb6fb064cb8ee97695cff9d7 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sun, 27 Aug 2023 12:11:51 +0530 Subject: [PATCH 2/3] 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 From 34cf08446584b03d9597f35d3f1440e6942972f7 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sun, 27 Aug 2023 12:33:29 +0530 Subject: [PATCH 3/3] invalid config removed --- _config-prod.yml | 8 -------- _config-uat.yml | 7 ------- 2 files changed, 15 deletions(-) diff --git a/_config-prod.yml b/_config-prod.yml index b4f1d8a..39be466 100644 --- a/_config-prod.yml +++ b/_config-prod.yml @@ -3,14 +3,6 @@ id: 'blog' url: "https://bangararaju.kottedi.in" -assets: - self_host: - enabled: true # boolean, keep empty means false - # specify the Jekyll environment, empty means both - # only works if `assets.self_host.enabled` is 'true' - env: production # [development|production] - - show_drafts: false future: false diff --git a/_config-uat.yml b/_config-uat.yml index 318de4b..25c4c1d 100644 --- a/_config-uat.yml +++ b/_config-uat.yml @@ -3,13 +3,6 @@ id: 'blog-uat' url: "https://bangararaju-uat.kottedi.in" -assets: - self_host: - enabled: true # boolean, keep empty means false - # specify the Jekyll environment, empty means both - # only works if `assets.self_host.enabled` is 'true' - env: development # [development|production] - show_drafts: true future: true