Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tpl/compare/init.go')
-rw-r--r--tpl/compare/init.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/tpl/compare/init.go b/tpl/compare/init.go
index fbc5e1fda..7d58cf9ab 100644
--- a/tpl/compare/init.go
+++ b/tpl/compare/init.go
@@ -69,6 +69,13 @@ func init() {
[][2]string{},
)
+ ns.AddMethodMapping(ctx.Conditional,
+ []string{"cond"},
+ [][2]string{
+ {`{{ cond (eq (add 2 2) 4) "2+2 is 4" "what?" | safeHTML }}`, `2+2 is 4`},
+ },
+ )
+
return ns
}