From 4602d54596becfd4477015b0b9ee97d331e8e9b2 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 28 Oct 2015 20:29:33 -0200 Subject: man: added example with comparision between 2 vars --- man/blogc-template.7.ronn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'man') diff --git a/man/blogc-template.7.ronn b/man/blogc-template.7.ronn index 4d21c74..83a39a0 100644 --- a/man/blogc-template.7.ronn +++ b/man/blogc-template.7.ronn @@ -144,8 +144,8 @@ In this case, if the `TITLE` variable is not defined, the content is included. ### if conditional The content of an `if` conditional is included in the output file when -the comparision between the given variable and the static string evaluates to -true in the current scope. +the comparision between the given variable and the given static string or +variable evaluates to true in the current scope. The available operators are: `==`, `!=`, `<`, `>`, `<=` and `>=`. The comparisions are strcmp(3)-like. @@ -156,6 +156,12 @@ This is how an `if` conditional is defined in a template: Title is "My Title" {% endif %} +Or: + + {% if TITLE == DEFAULT_TITLE %} + Title is the default title + {% endif %} + ## BUGS The template content is handled by handwritten parsers, that even being well -- cgit v1.2.3-18-g5258