aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2020-05-16 03:33:22 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2020-05-16 03:33:22 +0200
commit8e12ae57ebe87d25c2c34ec304047fec3013da85 (patch)
treefc7f974219f6d60d8e866a540da45f69e696546b /man
parentf5db671822b7b6dc74166c1c9e34a900c7f0d0cb (diff)
downloadblogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.tar.gz
blogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.tar.bz2
blogc-8e12ae57ebe87d25c2c34ec304047fec3013da85.zip
blogc: added listing_empty template block
Diffstat (limited to 'man')
-rw-r--r--man/blogc-template.7.ronn62
1 files changed, 38 insertions, 24 deletions
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` <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:
+
+ {% 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` <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.
+
### 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:
</ul>
{% 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` <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:
-
- {% 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` <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
Template variables are used to provide content to templates from blogc(1)