Skip to content

Commit 7fae0b0

Browse files
committed
Docs: Don't default-enable Google Analytics
Instead of generating the docs unconditionally with the OpenShot Google Analytics ID installed and tracking enabled, use the theme's built-in support for conditional analytics (controlled by the html_theme_options config dictionary), and only set html_theme_options.analytics_id on the command line for the official documentation update builds.
1 parent 90e7bc4 commit 7fae0b0

File tree

2 files changed

+1
-17
lines changed

2 files changed

+1
-17
lines changed

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ linux-builder:
2020
- export LD_LIBRARY_PATH=$CI_PROJECT_DIR/build/install-x64/lib:$LD_LIBRARY_PATH
2121
- echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "build/install-x64/share/$CI_PROJECT_NAME"
2222
- git log $(git describe --tags --abbrev=0 @^)..@ --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "build/install-x64/share/$CI_PROJECT_NAME.log"
23-
- cd doc; make html; cd ..;
23+
- cd doc; make html SPHINXOPTS="-D html_theme_options.analytics_id=UA-4381101-5"; cd ..;
2424
- ~/auto-update-sphinx "$CI_PROJECT_DIR/build" "$CI_COMMIT_REF_NAME"
2525
- python3 freeze.py build
2626
- python3 installer/build-server.py "$SLACK_TOKEN" "$S3_ACCESS_KEY" "$S3_SECRET_KEY" "$WINDOWS_KEY" "$WINDOWS_PASSWORD" "$GITHUB_USER" "$GITHUB_PASS" "False" "$CI_COMMIT_REF_NAME"

doc/_templates/layout.html

-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,2 @@
11
{% extends "!layout.html" %}
22
{% set css_files = css_files + ["_static/tablefix.css"] %}
3-
4-
{% block footer %}
5-
{{ super() }}
6-
<script type="text/javascript">
7-
// Google Analytics
8-
var _gaq = _gaq || [];
9-
_gaq.push(['_setAccount', 'UA-4381101-5']);
10-
_gaq.push(['_trackPageview']);
11-
12-
(function() {
13-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
14-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
15-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
16-
})();
17-
</script>
18-
{% endblock %}

0 commit comments

Comments
 (0)