mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-12 07:14:38 -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
|
--printMemoryUsage print memory usage to screen at intervals
|
||||||
--printPathWarnings print warnings on duplicate target paths etc.
|
--printPathWarnings print warnings on duplicate target paths etc.
|
||||||
--printUnusedTemplates print warnings on unused templates.
|
--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
|
--templateMetrics display metrics about template executions
|
||||||
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
--templateMetricsHints calculate some improvement hints when combined with --templateMetrics
|
||||||
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
-t, --theme strings themes to use (located in /themes/THEMENAME/)
|
||||||
|
@ -189,6 +189,9 @@ kind
|
|||||||
lang
|
lang
|
||||||
: A Glob pattern matching the Page's language, e.g. "{en,sv}".
|
: 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.
|
Any of the above can be omitted.
|
||||||
|
|
||||||
### Example
|
### 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.
|
`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
|
### Error Handling
|
||||||
|
|
||||||
{{< new-in "0.91.0" >}}
|
{{< new-in "0.91.0" >}}
|
||||||
|
@ -1860,6 +1860,7 @@
|
|||||||
"keepNumbers": false
|
"keepNumbers": false
|
||||||
},
|
},
|
||||||
"svg": {
|
"svg": {
|
||||||
|
"keepComments": false,
|
||||||
"precision": 0
|
"precision": 0
|
||||||
},
|
},
|
||||||
"xml": {
|
"xml": {
|
||||||
@ -4665,6 +4666,12 @@
|
|||||||
],
|
],
|
||||||
"Examples": []
|
"Examples": []
|
||||||
},
|
},
|
||||||
|
"ByType": {
|
||||||
|
"Description": "",
|
||||||
|
"Args": null,
|
||||||
|
"Aliases": null,
|
||||||
|
"Examples": null
|
||||||
|
},
|
||||||
"Concat": {
|
"Concat": {
|
||||||
"Description": "",
|
"Description": "",
|
||||||
"Args": null,
|
"Args": null,
|
||||||
@ -4694,7 +4701,7 @@
|
|||||||
"Examples": null
|
"Examples": null
|
||||||
},
|
},
|
||||||
"Get": {
|
"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": [
|
"Args": [
|
||||||
"filename"
|
"filename"
|
||||||
],
|
],
|
||||||
@ -4862,6 +4869,12 @@
|
|||||||
"Aliases": null,
|
"Aliases": null,
|
||||||
"Examples": null
|
"Examples": null
|
||||||
},
|
},
|
||||||
|
"Current": {
|
||||||
|
"Description": "",
|
||||||
|
"Args": null,
|
||||||
|
"Aliases": null,
|
||||||
|
"Examples": null
|
||||||
|
},
|
||||||
"Data": {
|
"Data": {
|
||||||
"Description": "",
|
"Description": "",
|
||||||
"Args": null,
|
"Args": null,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user