Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Macao Legacy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MACAO
Macao Legacy
Merge requests
!1
Main
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Closed
Main
main
into
26-html2markdown
Overview
0
Commits
39
Pipelines
0
Changes
4
Closed
Main
David Rouquet
requested to merge
main
into
26-html2markdown
10 months ago
Overview
0
Commits
39
Pipelines
0
Changes
4
0
0
Merge request reports
Viewing commit
0cfed790
Prev
Next
Show latest version
4 files
+
11
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
0cfed790
A bit of cleaning on the STTL templates
· 0cfed790
Eliott Sammier
authored
Aug 1, 2024
tetras_extraction/script/templates/activite.rq
+
8
−
12
View file @ 0cfed790
Edit in single-file editor
Open in Web IDE
Show full file
@@ -6,19 +6,15 @@ PREFIX owl: <http://www.w3.org/2002/07/owl#>
# Generic Activity template that creates a Markdown page with Hugo front-matter,
# and calls other specific templates when necessary
template
mt
:
activite
(
?act
)
{
mt
:
start_marker
(
?act
)
"/index.md"
st
:
nl
()
format
{
"""+++
title = "%s"
weight = %s0
+++
mt
:
start_marker
(
?act
)
"/index.md"
st
:
nl
()
'+++'
st
:
nl
()
'title = "'
?title
'"'
st
:
nl
()
# This is how optional variables (may be unbound) are handled
coalesce
(
st
:
format
(
'weight = %s
\n
'
,
?weight
*
10
),
""
)
'+++'
st
:
nl
()
st
:
nl
()
%s
"""
?title
?weight
?desc
}
?desc
st
:
nl
()
# Insert a Hugo shortcode to load the quiz if this is a quiz activity
if
(
exists
{
?act
a
:
Exercice
},
"
\n
{{< quiz >}}"
,
""
)
st
:
call-template
(
mt
:
quiz
,
?act
)
Loading