summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-06-16 14:19:31 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-06-16 14:19:31 +0200
commit0a9172672a7f2ed85cf675c96bd01b64641256bb (patch)
treeed778850d877a411838ae53f0385de0c68b32465 /docs/content/en/functions
parent6408c1cbc87f03fc9e92471165886ddbe7cdbeae (diff)
parentefa74c5c6e6ff1daddeb5834ea7c69bed2acf171 (diff)
Diffstat (limited to 'docs/content/en/functions')
-rw-r--r--docs/content/en/functions/findRe.md4
-rw-r--r--docs/content/en/functions/getenv.md2
-rw-r--r--docs/content/en/functions/htmlEscape.md2
-rw-r--r--docs/content/en/functions/htmlUnescape.md4
-rw-r--r--docs/content/en/functions/hugo.md4
-rw-r--r--docs/content/en/functions/index-function.md3
-rw-r--r--docs/content/en/functions/last.md1
-rw-r--r--docs/content/en/functions/md5.md2
-rw-r--r--docs/content/en/functions/plainify.md5
-rw-r--r--docs/content/en/functions/relurl.md2
-rw-r--r--docs/content/en/functions/seq.md2
-rw-r--r--docs/content/en/functions/templates.Exists.md2
-rw-r--r--docs/content/en/functions/time.md2
-rw-r--r--docs/content/en/functions/unix.md2
-rw-r--r--docs/content/en/functions/urls.Parse.md2
15 files changed, 13 insertions, 26 deletions
diff --git a/docs/content/en/functions/findRe.md b/docs/content/en/functions/findRe.md
index 743c8542b..653a482fa 100644
--- a/docs/content/en/functions/findRe.md
+++ b/docs/content/en/functions/findRe.md
@@ -18,8 +18,7 @@ deprecated: false
aliases: []
---
-
-By default all matches will be included. The number of matches can be limitted with an optional third parameter.
+By default all matches will be included. The number of matches can be limited with an optional third parameter.
The example below returns a list of all second level headers (`<h2>`) in the content:
@@ -40,7 +39,6 @@ Hugo uses Go's [Regular Expression package](https://golang.org/pkg/regexp/), whi
If you are just learning RegEx, or at least Go's flavor, you can practice pattern matching in the browser at <https://regex101.com/>.
{{% /note %}}
-
[partials]: /templates/partials/
[`plainify`]: /functions/plainify/
[toc]: /content-management/toc/
diff --git a/docs/content/en/functions/getenv.md b/docs/content/en/functions/getenv.md
index 8153cc07c..73569ece5 100644
--- a/docs/content/en/functions/getenv.md
+++ b/docs/content/en/functions/getenv.md
@@ -20,7 +20,7 @@ aliases: []
Takes a string containing the name of the variable as input. Returns
an empty string if the variable is not set, otherwise returns the
-value of the variable.
+value of the variable.
```
{{ getenv "HOME" }}
diff --git a/docs/content/en/functions/htmlEscape.md b/docs/content/en/functions/htmlEscape.md
index a1a2d6d55..00ab18c74 100644
--- a/docs/content/en/functions/htmlEscape.md
+++ b/docs/content/en/functions/htmlEscape.md
@@ -22,5 +22,5 @@ aliases: []
In the result `&` becomes `&amp;` and so on. It escapes only: `<`, `>`, `&`, `'` and `"`.
```
-{{ htmlEscape "Hugo & Caddy > Wordpress & Apache" }} → "Hugo &amp; Caddy &gt; Wordpress &amp; Apache"
+{{ htmlEscape "Hugo & Caddy > WordPress & Apache" }} → "Hugo &amp; Caddy &gt; WordPress &amp; Apache"
```
diff --git a/docs/content/en/functions/htmlUnescape.md b/docs/content/en/functions/htmlUnescape.md
index d0ef7540c..71db95249 100644
--- a/docs/content/en/functions/htmlUnescape.md
+++ b/docs/content/en/functions/htmlUnescape.md
@@ -19,10 +19,10 @@ deprecated: false
aliases: []
---
-`htmlUnescape` returns the given string with HTML escape codes un-escaped.
+`htmlUnescape` returns the given string with HTML escape codes un-escaped.
Remember to pass the output of this to `safeHTML` if fully un-escaped characters are desired. Otherwise, the output will be escaped again as normal.
```
-{{ htmlUnescape "Hugo &amp; Caddy &gt; Wordpress &amp; Apache" }} → "Hugo & Caddy > Wordpress & Apache"
+{{ htmlUnescape "Hugo &amp; Caddy &gt; WordPress &amp; Apache" }} → "Hugo & Caddy > WordPress & Apache"
```
diff --git a/docs/content/en/functions/hugo.md b/docs/content/en/functions/hugo.md
index 26069633d..099a5fa96 100644
--- a/docs/content/en/functions/hugo.md
+++ b/docs/content/en/functions/hugo.md
@@ -20,7 +20,7 @@ deprecated: false
draft: false
aliases: []
---
-
+
`hugo` returns an instance that contains the following functions:
hugo.Generator
@@ -29,7 +29,7 @@ hugo.Generator
hugo.Version
: the current version of the Hugo binary you are using e.g. `0.63.2`
-
+
`hugo` returns an instance that contains the following functions:
hugo.Environment
diff --git a/docs/content/en/functions/index-function.md b/docs/content/en/functions/index-function.md
index 94b9b4191..88dec29dc 100644
--- a/docs/content/en/functions/index-function.md
+++ b/docs/content/en/functions/index-function.md
@@ -38,8 +38,6 @@ The function takes multiple indices as arguments, and this can be used to get ne
{{ index $map "c" "e" }} => 20
```
-
-
## Example: Load Data from a Path Based on Front Matter Params
Assume you want to add a `location = ""` field to your front matter for every article written in `content/vacations/`. You want to use this field to populate information about the location at the bottom of the article in your `single.html` template. You also have a directory in `data/locations/` that looks like the following:
@@ -93,4 +91,3 @@ Now the call will return the specific file according to the location specified i
{{ (index .Site.Data.locations .Params.location).pop_city }}
=> 658390
```
-
diff --git a/docs/content/en/functions/last.md b/docs/content/en/functions/last.md
index f992b980a..bf65a8a6d 100644
--- a/docs/content/en/functions/last.md
+++ b/docs/content/en/functions/last.md
@@ -21,7 +21,6 @@ draft: false
aliases: []
---
-
```
{{ range last 10 .Pages }}
{{ .Render "summary" }}
diff --git a/docs/content/en/functions/md5.md b/docs/content/en/functions/md5.md
index db5442166..dfe76aa03 100644
--- a/docs/content/en/functions/md5.md
+++ b/docs/content/en/functions/md5.md
@@ -19,8 +19,6 @@ deprecated: false
aliases: []
---
-
-
```
{{ md5 "Hello world, gophers!" }}
<!-- returns the string "b3029f756f98f79e7f1b7f1d1f0dd53b" -->
diff --git a/docs/content/en/functions/plainify.md b/docs/content/en/functions/plainify.md
index 89e7880cd..88d1a759a 100644
--- a/docs/content/en/functions/plainify.md
+++ b/docs/content/en/functions/plainify.md
@@ -14,7 +14,7 @@ keywords: [strings]
signature: ["plainify INPUT"]
workson: []
hugoversion:
-relatedfuncs: [jsonify,]
+relatedfuncs: [jsonify]
deprecated: false
aliases: []
---
@@ -25,7 +25,4 @@ aliases: []
See also the `.PlainWords`, `.Plain`, and `.RawContent` [page variables][pagevars].
-
[pagevars]: /variables/page/
-
-
diff --git a/docs/content/en/functions/relurl.md b/docs/content/en/functions/relurl.md
index aa1536544..54e0d441d 100644
--- a/docs/content/en/functions/relurl.md
+++ b/docs/content/en/functions/relurl.md
@@ -1,6 +1,6 @@
---
title: relURL
-description: Given a string, prepends the relative URL according to a page's position in the project directory structure.
+description: Creates a baseURL-relative URL.
godocref:
date: 2017-02-01
publishdate: 2017-02-01
diff --git a/docs/content/en/functions/seq.md b/docs/content/en/functions/seq.md
index 8bef589c5..678a4c854 100644
--- a/docs/content/en/functions/seq.md
+++ b/docs/content/en/functions/seq.md
@@ -48,4 +48,4 @@ $indexStartingAt1 := (add $index 1)
```
-[GNU's seq]: http://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation
+[GNU's seq]: https://www.gnu.org/software/coreutils/manual/html_node/seq-invocation.html#seq-invocation
diff --git a/docs/content/en/functions/templates.Exists.md b/docs/content/en/functions/templates.Exists.md
index 3c8c96156..08ed37893 100644
--- a/docs/content/en/functions/templates.Exists.md
+++ b/docs/content/en/functions/templates.Exists.md
@@ -22,7 +22,7 @@ toc: false
deprecated: false
---
-A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes.
+A template file is any file living below the `layouts` directories of either the project or any of its theme components including partials and shortcodes.
The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
diff --git a/docs/content/en/functions/time.md b/docs/content/en/functions/time.md
index 306d32649..3be2d4368 100644
--- a/docs/content/en/functions/time.md
+++ b/docs/content/en/functions/time.md
@@ -29,7 +29,7 @@ aliases: []
## Example: Using `time` to get Month Index
-The following example takes a UNIX timestamp---set as `utimestamp: "1489276800"` in a content's front matter---converts the timestamp (string) to an integer using the [`int` function][int], and then uses [`printf`][] to convert the `Month` property of `time` into an index.
+The following example takes a UNIX timestamp---set as `utimestamp: "1489276800"` in a content's front matter---converts the timestamp (string) to an integer using the [`int` function][int], and then uses [`printf`][] to convert the `Month` property of `time` into an index.
The following example may be useful when setting up [multilingual sites][multilingual]:
diff --git a/docs/content/en/functions/unix.md b/docs/content/en/functions/unix.md
index a373475f6..49a120e3d 100644
--- a/docs/content/en/functions/unix.md
+++ b/docs/content/en/functions/unix.md
@@ -33,6 +33,4 @@ Since both values are integers, they can be subtracted and then divided by the n
Hugo's output is *static*. For the example above to be realistic, the site needs to be built every day.
{{% /note %}}
-
-
[partial template]: /templates/partials/
diff --git a/docs/content/en/functions/urls.Parse.md b/docs/content/en/functions/urls.Parse.md
index 6d0ade0f8..76c48d4db 100644
--- a/docs/content/en/functions/urls.Parse.md
+++ b/docs/content/en/functions/urls.Parse.md
@@ -21,7 +21,7 @@ aliases: []
```
-{{ $url := urls.Parse "http://www.gohugo.io" }}
+{{ $url := urls.Parse "http://www.gohugo.io" }}
```
and returns a [URL](https://godoc.org/net/url#URL) structure. The struct fields are accessed via the `.` notation: