From 8404096582103dccb8885b0c404f0a756685e913 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 22 Apr 2020 02:06:37 +0200 Subject: blogc: allow passing multiple -e options --- man/blogc-template.7.ronn | 16 ++++++++++++---- man/blogc.1.ronn | 7 +++++-- 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'man') diff --git a/man/blogc-template.7.ronn b/man/blogc-template.7.ronn index cf397b7..f418654 100644 --- a/man/blogc-template.7.ronn +++ b/man/blogc-template.7.ronn @@ -74,7 +74,7 @@ This is how a `listing_once` block is defined: will be included only once. {% endblock %} -This is a 'real life' usage example of a `listing_once` block, supposing +This is a 'real world' usage example of a `listing_once` block, supposing that the `TITLE` variable is defined: {% block listing_once %} @@ -90,9 +90,9 @@ that the `TITLE` variable is defined: ### listing_entry block This block is identical to the `entry` block, but its content is included in -the output file only when blogc(1) is called with `-l` and `-e` . The -variables available in the block are provided by the source file provided -using `-e`. +the output file only when blogc(1) is called with `-l` and `-e` +options. The variables available in the block are provided by the source +file provided using `-e` option. This is how a `listing_entry` block is defined: @@ -101,6 +101,14 @@ This is how a `listing_entry` block is defined: content provided by a single entry. {% endblock %} +When multiple `listing_entry` blocks are defined, blogc(1) should be called +with multiple `-e` options. If a `listing_entry` block does not have +a corresponding `-e` option, or if its value is an empty string, +the content of the `listing_entry` block is not included. + +`listing_entry` blocks inside iterator are evaluated as multiple blocks and +also require multiple `-e` options. blogc(1) won't use the same +source for every iteration. ## TEMPLATE VARIABLES diff --git a/man/blogc.1.ronn b/man/blogc.1.ronn index 8b5b52f..11f7808 100644 --- a/man/blogc.1.ronn +++ b/man/blogc.1.ronn @@ -57,8 +57,11 @@ designed to be used with make(1). * `-e` : When used together with `-l` the source file will be parsed and its content - will be made available for usage in the templates in listing mode. See - blogc-template(7) for details. + will be made available for usage in the templates in listing mode via + `listing_entry` blocks. This option can be used more than once, so users can + have more than one `listing_entry` block in the same template. Passing an + empty string will skip the `listing_entry` block. See blogc-template(7) for + details. * `-D` =: Set global configuration parameter. must be an ascii uppercase string, -- cgit v1.2.3-18-g5258