summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorArtem Sidorenko <artem@posteo.de>2017-07-03 00:20:49 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-07-03 00:20:48 +0200
commit34c566773a1364077e1397daece85b22948dc721 (patch)
treef38c7405225de9b4f861450ec3c69003746d94d1 /docs
parent41805dca9e40e9b0952e04d06074e6fc91140495 (diff)
tpl/math: Add log function
It might be very useful for building tag clouds.
Diffstat (limited to 'docs')
-rw-r--r--docs/content/templates/functions.md8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/content/templates/functions.md b/docs/content/templates/functions.md
index 0c6968bd2..99fb56d68 100644
--- a/docs/content/templates/functions.md
+++ b/docs/content/templates/functions.md
@@ -433,6 +433,12 @@ favicon.ico: {{.Width}} x {{.Height}}
</tr>
<tr>
+<td><code>math.Log</code></td>
+<td>Natural logarithm of one float.</td>
+<td><code>{{math.Log 1.0}}</code> → 0</td>
+</tr>
+
+<tr>
<td><code>mod</code></td>
<td>Modulus of two integers.</td>
<td><code>{{mod 15 3}}</code> → 0</td>
@@ -714,7 +720,7 @@ e.g.
* `{{ "this is a text" | truncate 10 " ..." }}` → `this is a ...`
* `{{ "<em>Keep my HTML</em>" | safeHTML | truncate 10 }}` → `<em>Keep my …</em>`
-* `{{ "With [Markdown](#markdown) inside." | markdownify | truncate 10 }}` → `With <a href='#markdown'>Markdown …</a>`
+* `{{ "With [Markdown](#markdown) inside." | markdownify | truncate 10 }}` → `With <a href='#markdown'>Markdown …</a>`
### split