From 976c398f6acb96561a9aea5d492b1b31d86a7422 Mon Sep 17 00:00:00 2001 From: Ryan Watters Date: Tue, 20 Jun 2017 11:58:48 -0500 Subject: [PATCH] Add numfmt to functions list Closes rdwatters/hugo-docs-concept#147 --- content/functions/NumFmt.md | 21 ++++++++------------- themes/gohugoioTheme | 2 +- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/content/functions/NumFmt.md b/content/functions/NumFmt.md index bc7860726..6d62f3568 100644 --- a/content/functions/NumFmt.md +++ b/content/functions/NumFmt.md @@ -1,14 +1,17 @@ --- title: numfmt linktitle: NumFmt -description: Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters. -godocref: +description: "Formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters." +godocref: "" workson: [] date: 2017-02-01 publishdate: 2017-02-01 lastmod: 2017-02-01 categories: [functions] -tags: [] +tags: [numbers] +menu: + docs: + parent: "functions" toc: false ns: "lang" signature: ["NumFmt "] @@ -16,13 +19,12 @@ workson: [] hugoversion: relatedfuncs: [] deprecated: false -draft: true +draft: false aliases: [] comments: --- -`NumFmt` formats a number with a given precision using the requested `decimal`, -`grouping`, and `negative` characters. +`lang.NumFmt` formats a number with a given precision using the requested `decimal`, `grouping`, and `negative` characters. The default options value is `- . ,`. Numbers greater than or equal to 5 are rounded up. For example, if precision is set to `0`, `1.5` becomes `2`, and `1.4` becomes `1`. @@ -32,10 +34,3 @@ Numbers greater than or equal to 5 are rounded up. For example, if precision is {{ lang.NumFmt "." "," "-" 0 -12345.6789 }} → -12,346 {{ -98765.4321 | lang.NumFmt "." "," "-" 2 }} → -98,765.43 ``` - - - - - - - diff --git a/themes/gohugoioTheme b/themes/gohugoioTheme index cb28c906b..fcae90950 160000 --- a/themes/gohugoioTheme +++ b/themes/gohugoioTheme @@ -1 +1 @@ -Subproject commit cb28c906b2441a70d017ac2ce35eb6d0ad07f156 +Subproject commit fcae909507f783b722acd2e20aeeb6fadfc43a7a