mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-10-06 06:10:56 -04:00

We need to rework the whole template func docs and, while a good idea, this does not fit into that.
29 lines
560 B
Markdown
29 lines
560 B
Markdown
---
|
|
title: replace
|
|
# linktitle: replace
|
|
description: Replaces all occurrences of the search string with the replacement string.
|
|
godocref:
|
|
date: 2017-02-01
|
|
publishdate: 2017-02-01
|
|
lastmod: 2017-02-01
|
|
categories: [functions]
|
|
menu:
|
|
docs:
|
|
parent: "functions"
|
|
#tags: []
|
|
signature: ["replace INPUT OLD NEW"]
|
|
workson: []
|
|
hugoversion:
|
|
relatedfuncs: []
|
|
deprecated: false
|
|
aliases: []
|
|
---
|
|
|
|
`replace` replaces all occurrences of the search string with the replacement string:
|
|
|
|
```
|
|
`{{ replace "Batman and Robin" "Robin" "Catwoman" }}`
|
|
→ "Batman and Catwoman"
|
|
```
|
|
|