Files
hugo/content/functions/countwords.md
T
Bud Parr 7fd64f19c8 Merge bp/theme-design branch containing Bud Parr's new design
It's a beautiful thing. A thousand thanks, Bud.

See PR rdwatters/hugo-docs-concept#118
2017-05-26 14:25:22 -05:00

769 B

title, linktitle, description, godocref, date, publishdate, lastmod, categories, menu, tags, ns, signature, workson, hugoversion, relatedfuncs, deprecated, aliases
title linktitle description godocref date publishdate lastmod categories menu tags ns signature workson hugoversion relatedfuncs deprecated aliases
countwords countwords Counts the number of words in a string that has been passed to it. 2017-02-01 2017-02-01 2017-02-01
functions
docs
parent
functions
counting
word count
countwords INPUT
countrunes
false
/functions/countrunes/
/functions/countwords/

countwords tries to convert the passed content to a string and counts each word in it. The template function works similar to the .WordCount page variable.

{{ "Hugo is a static site generator." | countwords }}
<!-- outputs a content length of 6 words.  -->