Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nghyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
nghyd
Commits
ae3126bd
Commit
ae3126bd
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Restore matomo tracking in docs
parent
66f5b62a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/matomo-tracking.js
+12
-0
12 additions, 0 deletions
docs/matomo-tracking.js
scripts/mkdocs-postprocess.js
+11
-8
11 additions, 8 deletions
scripts/mkdocs-postprocess.js
with
23 additions
and
8 deletions
docs/matomo-tracking.js
0 → 100644
+
12
−
0
View file @
ae3126bd
var
_paq
=
window
.
_paq
||
[];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq
.
push
([
'
disableCookies
'
]);
// évite de mettre en place un bandeau RGPD
_paq
.
push
([
'
trackPageView
'
]);
_paq
.
push
([
'
enableLinkTracking
'
]);
(
function
()
{
var
u
=
"
//stasi.g-eau.fr/
"
;
_paq
.
push
([
'
setTrackerUrl
'
,
u
+
'
matomo.php
'
]);
_paq
.
push
([
'
setSiteId
'
,
'
1
'
]);
var
d
=
document
,
g
=
d
.
createElement
(
'
script
'
),
s
=
d
.
getElementsByTagName
(
'
script
'
)[
0
];
g
.
type
=
'
text/javascript
'
;
g
.
async
=
true
;
g
.
defer
=
true
;
g
.
src
=
u
+
'
matomo.js
'
;
s
.
parentNode
.
insertBefore
(
g
,
s
);
})();
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/mkdocs-postprocess.js
+
11
−
8
View file @
ae3126bd
'
use strict
'
;
/**
* copies Math
j
ax to src/assets/docs/javascripts after doc was built by MkDocs
* copies
extra javascripts (
Math
J
ax
, matomo-tracking)
to src/assets/docs/javascripts after doc was built by MkDocs
*/
const
fs
=
require
(
'
fs-extra
'
);
const
destPath
=
"
src/assets/docs/javascripts/mathjax
"
;
const
destPath
=
"
src/assets/docs/javascripts
"
;
const
destPathMJ
=
destPath
+
"
/mathjax
"
;
// empty destination folder
fs
.
emptyDirSync
(
destPath
);
// create destination subfolders
fs
.
ensureDirSync
(
destPath
+
"
/fonts/HTML-CSS/TeX/
"
,
{
recursive
:
true
});
fs
.
ensureDirSync
(
destPath
MJ
+
"
/fonts/HTML-CSS/TeX/
"
,
{
recursive
:
true
});
// copy required files only
fs
.
copySync
(
"
node_modules/mathjax/MathJax.js
"
,
destPath
+
"
/MathJax.js
"
);
fs
.
copySync
(
"
node_modules/mathjax/config
"
,
destPath
+
"
/config
"
);
fs
.
copySync
(
"
node_modules/mathjax/jax
"
,
destPath
+
"
/jax
"
);
fs
.
copySync
(
"
node_modules/mathjax/fonts/HTML-CSS/TeX/woff
"
,
destPath
+
"
/fonts/HTML-CSS/TeX/woff
"
);
fs
.
copySync
(
"
node_modules/mathjax/fonts/HTML-CSS/TeX/otf
"
,
destPath
+
"
/fonts/HTML-CSS/TeX/otf
"
);
fs
.
copySync
(
"
node_modules/mathjax/MathJax.js
"
,
destPathMJ
+
"
/MathJax.js
"
);
fs
.
copySync
(
"
node_modules/mathjax/config
"
,
destPathMJ
+
"
/config
"
);
fs
.
copySync
(
"
node_modules/mathjax/jax
"
,
destPathMJ
+
"
/jax
"
);
fs
.
copySync
(
"
node_modules/mathjax/fonts/HTML-CSS/TeX/woff
"
,
destPathMJ
+
"
/fonts/HTML-CSS/TeX/woff
"
);
fs
.
copySync
(
"
node_modules/mathjax/fonts/HTML-CSS/TeX/otf
"
,
destPathMJ
+
"
/fonts/HTML-CSS/TeX/otf
"
);
fs
.
copySync
(
"
docs/matomo-tracking.js
"
,
destPath
+
"
/matomo-tracking.js
"
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment