mirror of
https://github.com/gohugoio/hugo.git
synced 2026-09-03 04:02:38 +00:00
9d68f695e7
36d7e22fDocument fmt.{print, println} template functions79a72fceFix link to page variables00342ca9Fix broken link on highlight page15f44952Fix link in v0.28 release notes0100df73Fix code examples for math.{Ceil, Floor, Round}a354a69bFix broken netlify.toml4995e5dfMerge branch 'master' of github.com:gohugoio/hugoDocs9cdd990aHugo 0.29463558f9Document math.Log template function588499afAdd nohup.out to .gitignoredb8ddcf7Change name of post files in example to use post prefix296ec01fAdd ox-hugo Emacs package to the tools sectionf060d6d1Fix math.Ceil, Floor, and Round naminga2262d24Document strings.TrimPrefix and TrimSuffix template functions80c1ce63Document strings.TrimLeft and TrimRight template functions2921088dDocument urls.Parse template functionf0133079Document math.{ceil, floor, round} template functions82863808Fix typo in migration tools sectiond5215d61Add link to syntax hl docs in release notes541f0686Update versions275ce2b4Update 0.28 release notes886713a1Add release notes for 0.28bed02e5fMerge branch 'next'8e3b1ac4Add a note about branches1662b9d0Add missing Disqus links in templates/internal.md git-subtree-dir: docs git-subtree-split:36d7e22f5c
1.8 KiB
1.8 KiB
title, description, godocref, date, publishdate, lastmod, keywords, categories, menu, toc, signature, workson, hugoversion, relatedfuncs, deprecated, draft, aliases
| title | description | godocref | date | publishdate | lastmod | keywords | categories | menu | toc | signature | workson | hugoversion | relatedfuncs | deprecated | draft | aliases | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Math | Hugo provides nine mathematical operators in templates. | 2017-02-01 | 2017-02-01 | 2017-02-01 |
|
|
|
false | false |
| Function | Description | Example |
|---|---|---|
add |
Adds two integers. | {{add 1 2}} → 3 |
div |
Divides two integers. | {{div 6 3}} → 2 |
mod |
Modulus of two integers. | {{mod 15 3}} → 0 |
modBool |
Boolean of modulus of two integers. Evaluates to true if result equals 0. |
{{modBool 15 3}} → true |
mul |
Multiplies two integers. | {{mul 2 3}} → 6 |
sub |
Subtracts two integers. | {{sub 3 2}} → 1 |
math.Ceil |
Returns the least integer value greater than or equal to the given number. | {{math.Ceil 2.1}} → 3 |
math.Floor |
Returns the greatest integer value less than or equal to the given number. | {{math.Floor 1.9}} → 1 |
math.Round |
Returns the nearest integer, rounding half away from zero. | {{math.Round 1.5}} → 2 |