Skip to content

Commit

Permalink
Disable user-tracking code in development
Browse files Browse the repository at this point in the history
This is copied over from how this is handled in the website repo.
  • Loading branch information
PeterJCLaw committed May 14, 2023
1 parent e7bfc9b commit f1edb2a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ social:
icon: tiktok
link: https://www.tiktok.com/@studentrobotics

user_tracking: true

exclude:
- README.md
- Rakefile
Expand Down
1 change: 1 addition & 0 deletions _dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user_tracking: false
4 changes: 3 additions & 1 deletion _includes/script.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
{% endfor %}
{% endif %}

<script defer data-domain="studentrobotics.org" src="https://plausible.io/js/plausible.js"></script>
{% if site.user_tracking %}
<script defer data-domain="studentrobotics.org" src="https://plausible.io/js/plausible.js"></script>
{% endif %}
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>

<script src="{{ '/js/navigation.js' | prepend: site.baseurl }}"></script>

0 comments on commit f1edb2a

Please sign in to comment.