Merge commit '5e078383a787e8b5ec3ba73f05ea4130840afbe2'

This commit is contained in:
Bjørn Erik Pedersen
2019-02-01 09:01:04 +01:00
79 changed files with 6251 additions and 391 deletions

View File

@@ -43,10 +43,11 @@ You may want to append a class to a heading according to the length of the strin
## `len` Example 2: Counting Pages with `where`
The following templating uses [`where`][] in conjunction with `len` to figure out the total number of content pages in a `posts` [section][]:
The following templating uses [`where`][] in conjunction with `len` to
figure out the total number of content pages in a `posts` [section][]:
{{< code file="how-many-posts.html" >}}
{{ $posts := (where .Site.RegularPages "Section" "==" "post") }}
{{ $posts := (where .Site.RegularPages "Section" "==" "posts") }}
{{ $postCount := len $posts }}
{{< /code >}}