From 8e12ae57ebe87d25c2c34ec304047fec3013da85 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sat, 16 May 2020 03:33:22 +0200 Subject: blogc: added listing_empty template block --- man/blogc-template.7.ronn | 62 +++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 24 deletions(-) (limited to 'man/blogc-template.7.ronn') diff --git a/man/blogc-template.7.ronn b/man/blogc-template.7.ronn index f418654..5184941 100644 --- a/man/blogc-template.7.ronn +++ b/man/blogc-template.7.ronn @@ -22,7 +22,8 @@ matches the requirements of the given block. Blocks can be defined more than once, but can't be nested. -The available blocks are: `entry`, `listing` and `listing_once`. +The available blocks are: `entry`, `listing`, `listing_empty`, `listing_entry` +and `listing_once`. ### entry block @@ -56,6 +57,42 @@ This is how a `listing` block is defined: will be included once for each entry. {% endblock %} +### listing_empty block + +This block is similar to the `listing` block, but its content is included +only when there are no entries to be listed, either because no source files +were provided or because there are no entries remaining after filtering (see +blogc-pagination(7)). + +This is how a `listing_empty` block is defined: + + {% block listing_empty %} + No entries available. + {% endblock %} + +### 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` +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: + + {% block listing_entry %} + This content will only be included when rendering a listing, but with + 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. + ### listing_once block The content of a `listing_once` block is included in the output file when @@ -87,29 +124,6 @@ that the `TITLE` variable is defined: {% endblock %} -### 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` -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: - - {% block listing_entry %} - This content will only be included when rendering a listing, but with - 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 Template variables are used to provide content to templates from blogc(1) -- cgit v1.2.3-18-g5258