PlainWords
Returns a slice of words created by calling the Plain method and splitting the result.
- Syntax
- PAGE.PlainWords
- Returns
- []string
The PlainWords method on a Page object calls the Plain method, then uses Go’s strings.Fields function to split the result into words.
The strings.Fields function splits the string around each instance of one or more consecutive whitespace characters, as defined by unicode.IsSpace. As a result, elements within the slice may contain leading or trailing punctuation.
{{ .PlainWords }}To determine the approximate number of unique words on a page:
{{ .PlainWords | uniq }} → 42To render the content in a named scope, call Markup.Render.PlainWords on a Page object.
Last updated:
November 8, 2026
:
content: Remove categories from front matter (1cc1dd83a)
Improve this page