Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vilem Ded
courses
Commits
ee98c622
Verified
Commit
ee98c622
authored
Jul 09, 2020
by
Laurent Heirendt
✈
Browse files
add matomo to contribute
parent
b610d9e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
contribute.py
View file @
ee98c622
...
...
@@ -46,7 +46,7 @@ def main(date, name):
click
.
echo
(
' > Directory for slides {0} created.'
.
format
(
slidesPath
))
else
:
click
.
echo
(
' > Directory for slides{0} already exists.'
.
format
(
slidesPath
))
click
.
echo
(
' > Directory for slides
{0} already exists.'
.
format
(
slidesPath
))
# change to the root directory of the presentation
os
.
chdir
(
fullPath
)
...
...
@@ -55,6 +55,13 @@ def main(date, name):
createSymlink
(
'../../theme'
,
'theme'
)
createSymlink
(
'../../theme/package.json'
,
'package.json'
)
# reset the theme
os
.
chdir
(
'../../theme'
)
os
.
system
(
'git checkout -- templates/_index.html'
)
os
.
chdir
(
fullPath
)
click
.
echo
(
' > Theme reset.'
)
# copy the contents of the template folder
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
fullPath
,
'slides'
,
'index.md'
)):
copy_tree
(
os
.
path
.
join
(
rootDir
,
'template'
,
'slides'
),
slidesPath
)
...
...
@@ -79,6 +86,13 @@ def main(date, name):
else
:
click
.
echo
(
' > All dependencies already installed.'
)
# add analytics
os
.
system
(
'sed -i "/matomohead/r./../../.ci/analytics/head.html" theme/templates/_index.html'
)
os
.
system
(
'sed -i "/matomopolicy/r./../../.ci/analytics/policy.html" theme/templates/_index.html'
)
os
.
system
(
'sed -i "/matomobanner/r./../../.ci/analytics/gdpr-banner.html" theme/templates/_index.html'
)
click
.
echo
(
' > Matomo added.'
)
# launch the server
os
.
system
(
'grunt server'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment