You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/configuration/http-cache.md
+34-12Lines changed: 34 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,20 +44,42 @@ The HTTP cache involves two key aspects: determining which content to cache (the
44
44
45
45
The HTTP cache behavior is defined for a configured set of resources. Stale resources will be refreshed from the file cache, even if their configured Time-To-Live (TTL) has not expired. If HTTP caching is disabled for a resource, Hugo will bypass the cache and access the file directly.
46
46
47
-
The default configuration disables everything:
47
+
This is the default configuration for HTTP caching:
48
48
49
-
{{< code-toggle file=hugo >}}
50
-
[HTTPCache.cache.for]
51
-
excludes = ['**']
52
-
includes = []
53
-
{{< /code-toggle >}}
49
+
{{< code-toggle config=HTTPCache />}}
50
+
51
+
respectCacheControlNoStoreInRequest
52
+
: {{< new-in 0.151.0 />}}
53
+
: (`bool`) Whether to respect the `no-store` directive in the server's `Cache-Control` request header when fetching remote resources via the [`resources.GetRemote`][] function. Default is `true`.
54
+
55
+
respectCacheControlNoStoreInResponse
56
+
: {{< new-in 0.151.0 />}}
57
+
: (`bool`) Whether to respect the `no-store` directive in the server's `Cache-Control` response header when fetching remote resources via the [`resources.GetRemote`][] function. Default is `false`.
54
58
55
59
cache.for.excludes
56
-
: (`string`) A list of [glob](g) patterns to exclude from caching.
60
+
: (`string`) A list of [glob](g) patterns to exclude from caching. In its default configuration HTTP caching excludes all files.
57
61
58
62
cache.for.includes
59
63
: (`string`) A list of [glob](g) patterns to cache.
60
64
65
+
polls
66
+
: A slice of polling configurations.
67
+
68
+
polls.disable
69
+
: (`bool`) Whether to disable polling for this configuration. Default is `true`.
70
+
71
+
polls.high
72
+
: (`string`) The maximum polling interval expressed as a [duration](g). This is used when the resource is considered stable. Default is `0s`.
73
+
74
+
polls.low
75
+
: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`. Default is `0s`.
76
+
77
+
polls.for.excludes
78
+
: (`string`) A list of [glob](g) patterns to exclude from polling for this configuration.
79
+
80
+
polls.for.includes
81
+
: (`string`) A list of [glob](g) patterns to include in polling for this configuration.
82
+
61
83
## HTTP polling
62
84
63
85
Polling is used in watch mode (e.g., `hugo server`) to detect changes in remote resources. Polling can be enabled even if HTTP caching is disabled. Detected changes trigger a rebuild of pages using the affected resource. Polling can be disabled for specific resources, typically those known to be static.
@@ -78,13 +100,13 @@ polls
78
100
: A slice of polling configurations.
79
101
80
102
polls.disable
81
-
: (`bool`) Whether to disable polling for this configuration.
82
-
83
-
polls.low
84
-
: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`.
103
+
: (`bool`) Whether to disable polling for this configuration. Default is `true`.
85
104
86
105
polls.high
87
-
: (`string`) The maximum polling interval expressed as a [duration](g). This is used when the resource is considered stable.
106
+
: (`string`) The maximum polling interval expressed as a [duration](g). This is used when the resource is considered stable. Default is `0s`.
107
+
108
+
polls.low
109
+
: (`string`) The minimum polling interval expressed as a [duration](g). This is used after a recent change and gradually increases towards `polls.high`. Default is `0s`.
88
110
89
111
polls.for.excludes
90
112
: (`string`) A list of [glob](g) patterns to exclude from polling for this configuration.
Copy file name to clipboardExpand all lines: content/en/configuration/markup.md
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,22 @@ enable = true
94
94
95
95
With this configuration, to format text as deleted, wrap it with double-tildes.
96
96
97
+
#### Footnote
98
+
99
+
Enabled by default, the Footnote extension enables inclusion of footnotes in Markdown.
100
+
101
+
enable
102
+
: {{< new-in 0.151.0 />}}
103
+
: (`bool`) Whether to enable the Footnotes extension. Default is `true`.
104
+
105
+
backlinkHTML
106
+
: {{< new-in 0.151.0 />}}
107
+
: (`string`) The HTML to be displayed at the end of a footnote that links the user back to the corresponding reference in the main text. The default is ↩︎ (a return arrow symbol).
108
+
109
+
enableAutoIDPrefix
110
+
: {{< new-in 0.151.0 />}}
111
+
: (`bool`) Whether to prependsa unique prefix to footnote IDs, preventing clashes when multiple documents are rendered together. This prefix is unique to each logical path, which means that the prefix is not unique across content dimensions such as language. Default is `false`.
0 commit comments