diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md index 33b95d51c..7d8067386 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -64,7 +64,8 @@ hugo server [flags] --printMemoryUsage print memory usage to screen at intervals --printPathWarnings print warnings on duplicate target paths etc. --printUnusedTemplates print warnings on unused templates. - --renderToDisk render to Destination path (default is render to memory & serve from there) + --renderStaticToDisk serve static files from disk and dynamic files from memory + --renderToDisk serve all files from disk (default is from memory) --templateMetrics display metrics about template executions --templateMetricsHints calculate some improvement hints when combined with --templateMetrics -t, --theme strings themes to use (located in /themes/THEMENAME/) diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index c068b9006..c915a5f96 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -189,6 +189,9 @@ kind lang : A Glob pattern matching the Page's language, e.g. "{en,sv}". +environment +: A Glob pattern matching the build environment, e.g. "{production,development}" + Any of the above can be omitted. ### Example diff --git a/content/en/hugo-pipes/introduction.md b/content/en/hugo-pipes/introduction.md index 83d64d1d3..bbafe55b2 100755 --- a/content/en/hugo-pipes/introduction.md +++ b/content/en/hugo-pipes/introduction.md @@ -53,6 +53,19 @@ With `resources.GetRemote`, the first argument is a remote URL: `resources.Get` and `resources.GetRemote` return `nil` if the resource is not found. +### Caching + +By default, Hugo calculates a cache key based on the `URL` and the `options` (e.g. headers) given. + + +{{< new-in "0.97.0" >}} You can override this by setting a `key` in the options map. This can be used to get more fine grained control over how often a remote resource is fetched, e.g.: + + +```go-html-template +{{ $cacheKey := print $url (now.Format "2006-01-02") }} +{{ $resource := resource.GetRemote $url (dict "key" $cacheKey) }} +``` + ### Error Handling {{< new-in "0.91.0" >}} diff --git a/data/docs.json b/data/docs.json index 2440fc930..ddd9e1246 100644 --- a/data/docs.json +++ b/data/docs.json @@ -1860,6 +1860,7 @@ "keepNumbers": false }, "svg": { + "keepComments": false, "precision": 0 }, "xml": { @@ -4665,6 +4666,12 @@ ], "Examples": [] }, + "ByType": { + "Description": "", + "Args": null, + "Aliases": null, + "Examples": null + }, "Concat": { "Description": "", "Args": null, @@ -4694,7 +4701,7 @@ "Examples": null }, "Get": { - "Description": "Get locates the filename given in Hugo's assets filesystem and\ncreates a Resource object that can be used for\nfurther transformations.", + "Description": "Get locates the filename given in Hugo's assets filesystem\nand creates a Resource object that can be used for further transformations.", "Args": [ "filename" ], @@ -4862,6 +4869,12 @@ "Aliases": null, "Examples": null }, + "Current": { + "Description": "", + "Args": null, + "Aliases": null, + "Examples": null + }, "Data": { "Description": "", "Args": null,