We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b340621 commit b490da8Copy full SHA for b490da8
content/post/_content.gotmpl
@@ -53,13 +53,16 @@
53
{{ $contentValue := partial "post_content" . }}
54
{{ $content := dict "mediaType" "text/markdown" "value" $contentValue }}
55
56
- {{/* Set "Posted on" date. */}}
57
- {{ $dates := dict "date" (time.AsTime .attributes.publishedAt) }}
58
-
59
{{/* Get sorting weight based on start date */}}
60
{{ $startAt := time.AsTime .attributes.startAt }}
61
{{ $weight := mul -1 $startAt.Unix }}
62
+ {{/* Set expiryDate one day later */}}
+ {{ $expiryDate := $startAt.AddDate 0 0 1 }}
+
63
+ {{/* Set "Posted on" and expiry date. */}}
64
+ {{ $dates := dict "date" (time.AsTime .attributes.publishedAt) "expiryDate" $expiryDate }}
65
66
{{/* Add page. */}}
67
{{ $page := dict
68
"content" $content
0 commit comments