Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
courses
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
R3
school
courses
Commits
ee98c622
Verified
Commit
ee98c622
authored
4 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
add matomo to contribute
parent
b610d9e6
No related branches found
No related tags found
2 merge requests
!84
Regular merge of develop
,
!83
Add matomo
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
contribute.py
+15
-1
15 additions, 1 deletion
contribute.py
with
15 additions
and
1 deletion
contribute.py
+
15
−
1
View file @
ee98c622
...
@@ -46,7 +46,7 @@ def main(date, name):
...
@@ -46,7 +46,7 @@ def main(date, name):
click
.
echo
(
'
> Directory for slides {0} created.
'
.
format
(
slidesPath
))
click
.
echo
(
'
> Directory for slides {0} created.
'
.
format
(
slidesPath
))
else
:
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
# change to the root directory of the presentation
os
.
chdir
(
fullPath
)
os
.
chdir
(
fullPath
)
...
@@ -55,6 +55,13 @@ def main(date, name):
...
@@ -55,6 +55,13 @@ def main(date, name):
createSymlink
(
'
../../theme
'
,
'
theme
'
)
createSymlink
(
'
../../theme
'
,
'
theme
'
)
createSymlink
(
'
../../theme/package.json
'
,
'
package.json
'
)
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
# copy the contents of the template folder
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
fullPath
,
'
slides
'
,
'
index.md
'
)):
if
not
os
.
path
.
isfile
(
os
.
path
.
join
(
fullPath
,
'
slides
'
,
'
index.md
'
)):
copy_tree
(
os
.
path
.
join
(
rootDir
,
'
template
'
,
'
slides
'
),
slidesPath
)
copy_tree
(
os
.
path
.
join
(
rootDir
,
'
template
'
,
'
slides
'
),
slidesPath
)
...
@@ -79,6 +86,13 @@ def main(date, name):
...
@@ -79,6 +86,13 @@ def main(date, name):
else
:
else
:
click
.
echo
(
'
> All dependencies already installed.
'
)
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
# launch the server
os
.
system
(
'
grunt server
'
)
os
.
system
(
'
grunt server
'
)
...
...
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