From f1edb2abe951213879f05cb6326f61e024ee414c Mon Sep 17 00:00:00 2001 From: Peter Law Date: Sun, 14 May 2023 17:02:45 +0100 Subject: [PATCH] Disable user-tracking code in development This is copied over from how this is handled in the website repo. --- Rakefile | 2 +- _config.yml | 2 ++ _dev.yml | 1 + _includes/script.html | 4 +++- 4 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 _dev.yml diff --git a/Rakefile b/Rakefile index a0626950..8b1a149f 100644 --- a/Rakefile +++ b/Rakefile @@ -35,7 +35,7 @@ end task :submodules => ['_sass/brand/.git'] task :dev => [:dependencies, :submodules] do - sh('bundle exec jekyll serve --host 0.0.0.0 --drafts --config _config.yml') + sh('bundle exec jekyll serve --host 0.0.0.0 --drafts --config _config.yml,_dev.yml') end task :build => [:dependencies, :submodules] do diff --git a/_config.yml b/_config.yml index 80a41249..81920e46 100644 --- a/_config.yml +++ b/_config.yml @@ -52,6 +52,8 @@ social: icon: tiktok link: https://www.tiktok.com/@studentrobotics +user_tracking: true + exclude: - README.md - Rakefile diff --git a/_dev.yml b/_dev.yml new file mode 100644 index 00000000..e5fdbeb2 --- /dev/null +++ b/_dev.yml @@ -0,0 +1 @@ +user_tracking: false diff --git a/_includes/script.html b/_includes/script.html index 31e54719..c4993cd9 100644 --- a/_includes/script.html +++ b/_includes/script.html @@ -10,7 +10,9 @@ {% endfor %} {% endif %} - +{% if site.user_tracking %} + +{% endif %}