mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
tpl/math: Add log function
It might be very useful for building tag clouds.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
41805dca9e
commit
34c566773a
@@ -432,6 +432,12 @@ favicon.ico: {{.Width}} x {{.Height}}
|
||||
<td><code>{{div 6 3}}</code> → 2</td>
|
||||
</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>
|
||||
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user