github.com/rabbouni145/gg@v0.47.1/docs/content/en/functions/countwords.md (about)

     1  ---
     2  title: countwords
     3  description: Counts the number of words in a string.
     4  godocref:
     5  date: 2017-02-01
     6  publishdate: 2017-02-01
     7  lastmod: 2017-02-01
     8  categories: [functions]
     9  menu:
    10    docs:
    11      parent: "functions"
    12  keywords: [counting, word count]
    13  signature: ["countwords INPUT"]
    14  workson: []
    15  hugoversion:
    16  relatedfuncs: [countrunes]
    17  deprecated: false
    18  ---
    19  
    20  The template function works similar to the [.WordCount page variable][pagevars].
    21  
    22  ```
    23  {{ "Hugo is a static site generator." | countwords }}
    24  <!-- outputs a content length of 6 words.  -->
    25  ```
    26  
    27  
    28  [pagevars]: /variables/page/