aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-12-29 01:46:50 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-12-29 01:46:50 +0100
commit3d24a8847e156804e19515ddeefd3912402515be (patch)
tree01c79d43b529df75211b991c74f35c2782a177ff /man
parente727bdcde63804a308103adeaa2637c5ee1ebdc8 (diff)
downloadblogc-3d24a8847e156804e19515ddeefd3912402515be.tar.gz
blogc-3d24a8847e156804e19515ddeefd3912402515be.tar.bz2
blogc-3d24a8847e156804e19515ddeefd3912402515be.zip
renderer: foreach variables should be splitted in spaces rather than commas
Diffstat (limited to 'man')
-rw-r--r--man/blogc-template.7.ronn14
1 files changed, 6 insertions, 8 deletions
diff --git a/man/blogc-template.7.ronn b/man/blogc-template.7.ronn
index 46413c2..2875e36 100644
--- a/man/blogc-template.7.ronn
+++ b/man/blogc-template.7.ronn
@@ -176,15 +176,13 @@ The content of a `foreach` iterator is included in the output file when the targ
variable is defined, and is repeated for each item in the list parsed from the variable
value.
-The variable value should be formatted as a comma-separated list of items. Quotes are
+The variable value should be formatted as a space-separated list of items. Quotes are
not supported, as this is intended to work with identifiers, like slugs, and not with
arbitrary strings.
-Spaces and tabs before and after list items are stripped for consistency.
+This is how a variable value would be formatted:
-This is how a variable would be formatted:
-
- item1, item2, item3
+ item1 item2 item3
For more info about how to define variables, see blogc(1) and blogc-source(7).
@@ -194,12 +192,12 @@ This is how a `foreach` iterator is defined in a template:
<a href="/tag/{{ FOREACH_ITEM }}/">{{ FOREACH_ITEM }}</a>
{% endforeach %}
-Where `TAGS` is the variable with comma-separated list of items, and `FOREACH_ITEM`
+Where `TAGS` is the variable with space-separated list of items, and `FOREACH_ITEM`
is the variable defined by blogc(1), that will store the item value for a given
iteration.
-If the value of the `TAGS` variable is "item1, item2, item3", this template would be
-rendered as 3 times, one for each item value.
+If the value of the `TAGS` variable is "item1 item2 item3", this template is
+rendered 3 times, one for each item value.
## BUGS