mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 12:12:37 +00:00
7fd64f19c8
It's a beautiful thing. A thousand thanks, Bud. See PR rdwatters/hugo-docs-concept#118
35 lines
655 B
Markdown
35 lines
655 B
Markdown
---
|
|
title: plainify
|
|
linktitle: plainify
|
|
description: Strips any HTML and returns the plain text version of the provided string.
|
|
godocref:
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-04-30
|
|
categories: [functions]
|
|
menu:
|
|
docs:
|
|
parent: "functions"
|
|
tags: [strings]
|
|
ns:
|
|
signature: ["plainify INPUT"]
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: [jsonify,]
|
|
deprecated: false
|
|
aliases: []
|
|
---
|
|
|
|
`plainify` strips any HTML and returns the plain text version of the provided string.
|
|
|
|
```
|
|
{{ "<b>BatMan</b>" | plainify }} → "BatMan"
|
|
```
|
|
|
|
See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
|
|
|
|
|
|
[pagevars]: /variables/page/
|
|
|
|
|