diff options
Diffstat (limited to 'docs/content/en/functions/len.md')
-rw-r--r-- | docs/content/en/functions/len.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/content/en/functions/len.md b/docs/content/en/functions/len.md index e054ed5f8..e95d49c4a 100644 --- a/docs/content/en/functions/len.md +++ b/docs/content/en/functions/len.md @@ -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 >}} |