Skip to content

Commit

Permalink
Document HUGO_MEMORYLIMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Feb 15, 2024
1 parent d7b043f commit a34d9cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
18 changes: 17 additions & 1 deletion content/en/getting-started/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,24 @@ none

## Configuration environment variables

DART_SASS_BINARY
: (`string`) The absolute path to the Dart Sass executable. By default, Hugo searches for the executable in each of the paths in the `PATH` environment variable.

HUGO_ENVIRONMENT
: (`string`) Overrides the default [environment], typically one of `development`, `staging`, or `production`.

[environment]: /getting-started/glossary/#environment

HUGO_FILE_LOG_FORMAT
: (`string`) A format string for the file path, line number, and column number displayed when reporting errors, or when calling the `Position` method from a shortcode or Markdown render hook. Valid tokens are `:file`, `:line`, and `:col`. Default is `:file::line::col`.

{{< new-in 0.123.0 >}}

HUGO_MEMORYLIMIT
: (`int`) The maximum amount of system memory, in gigabytes, that Hugo can use while rendering your site. Default is 25% of total system memory.

HUGO_NUMWORKERMULTIPLIER
: Can be set to increase or reduce the number of workers used in parallel processing in Hugo. If not set, the number of logical CPUs will be used.
: (`int`) The number of workers used in parallel processing. Default is the number of logical CPUs.

## Configure with environment variables

Expand Down
2 changes: 1 addition & 1 deletion content/en/getting-started/glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ A member of a slice or array.

Typically one of `development`, `staging`, or `production`, each environment may exhibit different behavior depending on configuration and template logic. For example, in a production environment you might minify and fingerprint CSS, but that probably doesn't make sense in a development environment.

When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag.
When running the built-in development server with the `hugo server` command, the environment is set to `development`. When building your site with the `hugo` command, the environment is set to `production`. To override the environment value, use the `--environment` command line flag or the `HUGO_ENVIRONMENT` environment variable.

To determine the current environment within a template, use the [`hugo.Environment`] function.

Expand Down
2 changes: 1 addition & 1 deletion layouts/shortcodes/eturl.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
{{- errorf "The %q shortcode was unable to find a URL for the embedded template named %q. Check the name. See %s" $.Name $filename $.Position -}}
{{- end -}}
{{- else -}}
{{- errorf "The %q shortcode was unable to find the embedded_templates data file in the site's data directory. See %s" $.Name $.Position -}}
{{- errorf "The %q shortcode was unable to find the embedded_template_urls data file in the site's data directory. See %s" $.Name $.Position -}}
{{- end -}}
{{- else -}}
{{- errorf "The %q shortcodes requires a named or positional parameter, the file name of the embedded template, excluding its extension. See %s" .Name .Position -}}
Expand Down

0 comments on commit a34d9cc

Please sign in to comment.