From: digitalcraftsman Date: Sat, 3 Dec 2016 19:12:12 +0000 (+0100) Subject: docs: Document querify template func X-Git-Tag: v0.18~29 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0ba9fb96;p=brevno-suite%2Fhugo docs: Document querify template func Closes #2733 --- diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md index a2c56020..68bebb0d 100644 --- a/docs/content/templates/functions.md +++ b/docs/content/templates/functions.md @@ -880,6 +880,16 @@ Takes a string and sanitizes it for usage in URLs, converts spaces to "-". e.g. `{{ . }}` +### 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 cen be postpended to a url. E.g. + + Search + +will be rendered as + + Search + ## Content Views