diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-04-22 02:06:37 +0200 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2020-04-22 02:06:37 +0200 |
commit | 8404096582103dccb8885b0c404f0a756685e913 (patch) | |
tree | 97d74ba2dd9591f55bd4284de6d40ba673eb8bec /man | |
parent | 67c856608a746b5205300d3f8141a6a29d3cc89e (diff) | |
download | blogc-8404096582103dccb8885b0c404f0a756685e913.tar.gz blogc-8404096582103dccb8885b0c404f0a756685e913.tar.bz2 blogc-8404096582103dccb8885b0c404f0a756685e913.zip |
blogc: allow passing multiple -e options
Diffstat (limited to 'man')
-rw-r--r-- | man/blogc-template.7.ronn | 16 | ||||
-rw-r--r-- | man/blogc.1.ronn | 7 |
2 files changed, 17 insertions, 6 deletions
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` <SOURCE>. 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` <SOURCE> +options. The variables available in the block are provided by the source +file provided using `-e` <SOURCE> 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` <SOURCE> options. If a `listing_entry` block does not have +a corresponding `-e` <SOURCE> 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` <SOURCE> 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` <SOURCE>: 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` <KEY>=<VALUE>: Set global configuration parameter. <KEY> must be an ascii uppercase string, |