mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
13
docs/content/en/functions/_common/_index.md
Normal file
13
docs/content/en/functions/_common/_index.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
cascade:
|
||||
_build:
|
||||
list: never
|
||||
publishResources: false
|
||||
render: never
|
||||
---
|
||||
|
||||
<!--
|
||||
Files within this headless branch bundle are markdown snippets. Each file must contain front matter delimiters, though front matter fields are not required.
|
||||
|
||||
Include the rendered content using the "include" shortcode.
|
||||
-->
|
23
docs/content/en/functions/_common/glob-patterns.md
Normal file
23
docs/content/en/functions/_common/glob-patterns.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
# Do not remove front matter.
|
||||
---
|
||||
|
||||
Path|Pattern|Match
|
||||
:--|:--|:--
|
||||
`images/foo/a.jpg`|`images/foo/*.jpg`|`true`
|
||||
`images/foo/a.jpg`|`images/foo/*.*`|`true`
|
||||
`images/foo/a.jpg`|`images/foo/*`|`true`
|
||||
`images/foo/a.jpg`|`images/*/*.jpg`|`true`
|
||||
`images/foo/a.jpg`|`images/*/*.*`|`true`
|
||||
`images/foo/a.jpg`|`images/*/*`|`true`
|
||||
`images/foo/a.jpg`|`*/*/*.jpg`|`true`
|
||||
`images/foo/a.jpg`|`*/*/*.*`|`true`
|
||||
`images/foo/a.jpg`|`*/*/*`|`true`
|
||||
`images/foo/a.jpg`|`**/*.jpg`|`true`
|
||||
`images/foo/a.jpg`|`**/*.*`|`true`
|
||||
`images/foo/a.jpg`|`**/*`|`true`
|
||||
`images/foo/a.jpg`|`**`|`true`
|
||||
`images/foo/a.jpg`|`*/*.jpg`|`false`
|
||||
`images/foo/a.jpg`|`*.jpg`|`false`
|
||||
`images/foo/a.jpg`|`*.*`|`false`
|
||||
`images/foo/a.jpg`|`*`|`false`
|
@@ -1,3 +0,0 @@
|
||||
See Go's [text/template] documentation for more details.
|
||||
|
||||
[text/template]: https://pkg.go.dev/text/template
|
@@ -1,3 +0,0 @@
|
||||
+++
|
||||
headless = true
|
||||
+++
|
@@ -1,3 +1,10 @@
|
||||
---
|
||||
# Do not remove front matter.
|
||||
---
|
||||
|
||||
{{% note %}}
|
||||
|
||||
Localization of dates, currencies, numbers, and percentages is performed by the [gohugoio/locales] package. The language tag of the current site must match one of the listed locales.
|
||||
|
||||
[gohugoio/locales]: https://github.com/gohugoio/locales
|
||||
{{% /note %}}
|
||||
|
@@ -1,3 +1,7 @@
|
||||
---
|
||||
# Do not remove front matter.
|
||||
---
|
||||
|
||||
When specifying the regular expression, use a raw [string literal] (backticks) instead of an interpreted string literal (double quotes) to simplify the syntax. With an interpreted string literal you must escape backslashes.
|
||||
|
||||
Go's regular expression package implements the [RE2 syntax]. The RE2 syntax is a subset of that accepted by [PCRE], roughly speaking, and with various [caveats]. Note that the RE2 `\C` escape sequence is not supported.
|
||||
|
@@ -1,12 +1,16 @@
|
||||
---
|
||||
# Do not remove front matter.
|
||||
---
|
||||
|
||||
Format a `time.Time` value based on [Go's reference time]:
|
||||
|
||||
[Go's reference time]: https://pkg.go.dev/time#pkg-constants
|
||||
|
||||
```text {copy=false}
|
||||
```text
|
||||
Mon Jan 2 15:04:05 MST 2006
|
||||
```
|
||||
|
||||
Create a format string using these components:
|
||||
Create a layout string using these components:
|
||||
|
||||
Description|Valid components
|
||||
:--|:--
|
||||
@@ -21,7 +25,7 @@ Second|`"5" "05"`
|
||||
AM/PM mark|`"PM"`
|
||||
Time zone offsets|`"-0700" "-07:00" "-07" "-070000" "-07:00:00"`
|
||||
|
||||
Replace the sign in the format string with a Z to print Z instead of an offset for the UTC zone.
|
||||
Replace the sign in the layout string with a Z to print Z instead of an offset for the UTC zone.
|
||||
|
||||
Description|Valid components
|
||||
:--|:--
|
||||
|
Reference in New Issue
Block a user