Skip to content
Snippets Groups Projects

Main

4 files
+ 11
26
Compare changes
  • Side-by-side
  • Inline

Files

@@ -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