diff options
author | Joshua Wong <joshwonghc@gmail.com> | 2020-02-26 00:58:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 17:58:07 +0100 |
commit | 1352bc880df4cd25eff65843973fcc0dd21b6304 (patch) | |
tree | 691d52ed2bd5971be3190a8f282e84c05a974917 /docs/content | |
parent | d184e5059c72c15df055192b01da0fd8c5b0fc5c (diff) |
Add hugo.IsProduction function
Fixes #6873
Diffstat (limited to 'docs/content')
-rw-r--r-- | docs/content/en/functions/hugo.md | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/content/en/functions/hugo.md b/docs/content/en/functions/hugo.md index d615fa721..26069633d 100644 --- a/docs/content/en/functions/hugo.md +++ b/docs/content/en/functions/hugo.md @@ -33,7 +33,7 @@ hugo.Version `hugo` returns an instance that contains the following functions: hugo.Environment -: the current running environment as defined through the `--environment` cli tag. +: the current running environment as defined through the `--environment` cli tag hugo.CommitHash : the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247` @@ -41,7 +41,8 @@ hugo.CommitHash hugo.BuildDate : the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00` - +hugo.IsProduction +: returns true if `hugo.Environment` is set to the production environment {{% note "Use the Hugo Generator Tag" %}} We highly recommend using `hugo.Generator` in your website's `<head>`. `hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](https://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo. |