mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-05 08:42:12 +00:00
docs: Fix querify example
This commit is contained in:
parent
7862de91de
commit
e4ebe0d5bf
|
@ -893,9 +893,9 @@ e.g. `<a href="/tags/{{ . | urlize }}">{{ . }}</a>`
|
|||
|
||||
### querify
|
||||
|
||||
Takes a set of key-value pairs and returns a [`url.Values`](https://godoc.org/net/url#Values) object. The [`Encode`](https://godoc.org/net/url#Values.Encode) method turns the pairs into a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a url. E.g.
|
||||
Takes a set of key-value pairs and returns a [query string](https://en.wikipedia.org/wiki/Query_string) that can be appended to a URL. E.g.
|
||||
|
||||
<a href="https://www.google.com?{{ (querify "q" "test" "page" 3).Encode | safeHTML }}">Search</a>
|
||||
<a href="https://www.google.com?{{ (querify "q" "test" "page" 3) | safeURL }}">Search</a>
|
||||
|
||||
will be rendered as
|
||||
|
||||
|
|
Loading…
Reference in a new issue