mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
content: Miscellaneous edits
This commit is contained in:
@@ -15,7 +15,7 @@ The `Round` method operates on TIME as an absolute duration since the [zero time
|
||||
|
||||
```go-html-template
|
||||
{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
|
||||
{{ $d := time.ParseDuration "1h"}}
|
||||
{{ $d := time.ParseDuration "1h" }}
|
||||
|
||||
{{ ($t.Round $d).Format "2006-01-02T15:04:05-00:00" }} → 2023-01-28T00:00:00-00:00
|
||||
```
|
||||
|
||||
@@ -13,7 +13,7 @@ The `Truncate` method operates on TIME as an absolute duration since the [zero t
|
||||
|
||||
```go-html-template
|
||||
{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
|
||||
{{ $d := time.ParseDuration "1h"}}
|
||||
{{ $d := time.ParseDuration "1h" }}
|
||||
|
||||
{{ ($t.Truncate $d).Format "2006-01-02T15:04:05-00:00" }} → 2023-01-27T23:00:00-00:00
|
||||
```
|
||||
|
||||
@@ -3,4 +3,4 @@ title: raw string literal
|
||||
reference: https://go.dev/ref/spec#String_literals
|
||||
---
|
||||
|
||||
A _raw string literal_ is a character sequences between backticks, as in \`bar\`. Within the backticks, any character may appear except a backtick. Backslashes have no special meaning and the string may contain newlines. Carriage return characters (`\r`) inside raw string literals are discarded from the raw string value.
|
||||
A _raw string literal_ is a character sequence between backticks, as in \`bar\`. Within the backticks, any character may appear except a backtick. Backslashes have no special meaning and the string may contain newlines. Carriage return characters (`\r`) inside raw string literals are discarded from the raw string value.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Do not delete. Required for layouts/shortcodes/list-pages-in-section.html.
|
||||
# Do not delete. Required for layouts/_shortcodes/list-pages-in-section.html.
|
||||
#
|
||||
# When calling the list-pages-in-section shortcode, you can specify a page
|
||||
# filter, and whether the pages in the filter should be included or excluded
|
||||
|
||||
Reference in New Issue
Block a user