mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit '35febb2e2a3780c3338a2665fddea7dda28a17f4'
This commit is contained in:
@@ -87,9 +87,11 @@ date: 2017-03-03T14:15:59-06:00
|
||||
`"Mon, 02 Jan 2006 15:04:05 MST"` (RFC1123)
|
||||
: **Returns**: `Fri, 03 Mar 2017 14:15:59 CST`
|
||||
|
||||
`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC339)
|
||||
`"Mon, 02 Jan 2006 15:04:05 -0700"` (RFC1123Z)
|
||||
: **Returns**: `Fri, 03 Mar 2017 14:15:59 -0600`
|
||||
|
||||
More examples can be found in Go's [documentation for the time package][timeconst].
|
||||
|
||||
### Cardinal Numbers and Ordinal Abbreviations
|
||||
|
||||
Spelled-out cardinal numbers (e.g. "one", "two", and "three") and ordinal abbreviations (i.e., with shorted suffixes like "1st", "2nd", and "3rd") are not currently supported:
|
||||
@@ -121,3 +123,4 @@ In conjunction with the [`dateFormat` function][dateFormat], you can also conver
|
||||
[gdex]: https://golang.org/pkg/time/#example_Time_Format
|
||||
[pagevars]: /variables/page/
|
||||
[time]: https://golang.org/pkg/time/
|
||||
[timeconst]: https://golang.org/pkg/time/#ANSIC
|
||||
|
@@ -28,6 +28,8 @@ So, if you have a file with the name `README.txt` in the root of your project wi
|
||||
|
||||
If you receive a "file doesn't exist" error with a path listed, do take note that the path is the last one checked by the function, and may not accurately reflect your target. You should generally double-check your path for mistakes.
|
||||
|
||||
Note that there is a 1 MB file size limit.
|
||||
|
||||
For more information on using `readDir` and `readFile` in your templates, see [Local File Templates][local].
|
||||
|
||||
[local]: /templates/files/
|
||||
|
@@ -24,7 +24,7 @@ deprecated: false
|
||||
|
||||
A template file is any file living below the `layouts` directories of either the project or any of its theme components incudling partials and shortcodes.
|
||||
|
||||
The function is particulary handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
|
||||
The function is particularly handy with dynamic path. The following example ensures the build will not break on a `.Type` missing its dedicated `header` partial.
|
||||
|
||||
```go-html-template
|
||||
{{ $partialPath := printf "headers/%s.html" .Type }}
|
||||
@@ -34,4 +34,4 @@ The function is particulary handy with dynamic path. The following example ensur
|
||||
{{ partial "headers/default.html" . }}
|
||||
{{ end }}
|
||||
|
||||
```
|
||||
```
|
||||
|
@@ -31,3 +31,7 @@ Can be combined in pipes. In the following snippet, the link text is cleaned up
|
||||
<li><a href="{{ printf "%s/%s" "categories" ($name | urlize | lower) | absURL }}">{{ $name | humanize | title }} ({{ len $items }})</a></li>
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
## Configure Title Case
|
||||
|
||||
The default is AP Stylebook, but you can [configure it](/getting-started/configuration/#configure-title-case).
|
||||
|
Reference in New Issue
Block a user