Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
# * key: `wiki.git_branch`
# * default: `master`
var git_branch: String is lazy do return value_or_default("wiki.git_branch", "master")
+
+ # URL to source versionning used to display last changes
+ #
+ # * key: `wiki.last_changes`
+ # * default: ``
+ var last_changes: String is lazy do return value_or_default("wiki.last_changes", "")
+
+ # URL to source edition.
+ #
+ # * key: `wiki.edit`
+ # * default: ``
+ var edit: String is lazy do return value_or_default("wiki.edit", "")
end
# WikiSection custom configuration.
if tpl.has_macro("GEN_TIME") then
tpl.replace("GEN_TIME", time.to_s)
end
+ if tpl.has_macro("LAST_CHANGES") then
+ var url = "{wiki.config.last_changes}{src_path or else ""}"
+ tpl.replace("LAST_CHANGES", url)
+ end
+ if tpl.has_macro("EDIT") then
+ var url = "{wiki.config.edit}{src_path or else ""}"
+ tpl.replace("EDIT", url)
+ end
return tpl
end
end