diff --git a/tetras_extraction/script/templates/module.rq b/tetras_extraction/script/templates/module.rq index e2a3c458ba560758d4c859fe69cf07f8f3241264..f48e7a89269fcf744f93768e36f05ec28c430b75 100644 --- a/tetras_extraction/script/templates/module.rq +++ b/tetras_extraction/script/templates/module.rq @@ -5,23 +5,17 @@ PREFIX st: <http://ns.inria.fr/sparql-template/> # Recursive template for Modules and SousParties (because SousParties are just # leaf-level modules) template mt:module(?mod) { - mt:start_marker(?mod) "/_index.md" st:nl() - format { - """+++ -title = "%s" -%sbookCollapseSection = true -+++ + mt:start_marker(?mod) "/_index.md" "\n" -# %1$s + "+++\n" + 'title = "' ?title '"\n' + coalesce(st:format("weight = %s\n", ?weight * 10), "") + "bookCollapseSection = true\n" + "+++\n\n" -{{< section >}} -""" - # STTL format{} apparently supports printf-style format string syntax - # (not explicitly documented but confirmed from testing), including - # "%1$" position specifiers, which allows reusing the 1st param by index - ?title - coalesce(st:format("weight = %s\n", ?weight * 10), "") - } st:nl() + "# " ?title "\n\n" + + "{{< section >}}\n\n" group { st:call-template(mt:module, ?child) ; separator=''