mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-11 09:34:46 -04:00
Merge branch 'tempv0.97.0'
This commit is contained in:
commit
fa7db7c7ee
@ -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/)
|
||||
|
@ -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
|
||||
|
@ -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" >}}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user