Verified Commit ee98c622 authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

add matomo to contribute

parent b610d9e6
......@@ -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')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment