diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ba352cf39e3bd1358c1ad5b1eb0d0eec7ff84a09..11bf1e959f457cf097f80087d7cd95b44897cff0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -66,6 +66,7 @@ build_doc:
 pkg_source:
   stage: test_and_pkg
   script:
+    - rm doc/manual/source/_static/mathjax && sed -i "/^mathjax_path *=/d" doc/manual/source/conf.py
     - 'for f in configure.ac preprocessor/configure.ac mex/build/matlab/configure.ac mex/build/octave/configure.ac; do sed -i "s/^AC_INIT(\[\(.*\)\],\s*\[\(.*\)\])/AC_INIT([\1], [$VERSION])/" $f; done'
     - autoreconf -si
     - ./configure --with-matlab=$MATLAB_PATH MATLAB_VERSION=$MATLAB_VERSION