mirror of
https://github.com/panr/hugo-theme-terminal.git
synced 2025-03-14 18:29:03 +03:00
layouts/partials: post-date: Add support for created date prefix.
With this, one can set prefix for creation date from the config using "createdDatePrefix". In case it's not set, no prefix is set, which preserves the existing behaviour. Signed-off-by: Siddh Raman Pant <25429745+siddhpant@users.noreply.github.com>
This commit is contained in:
parent
43309b7f31
commit
5c0aeac657
1 changed files with 5 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
<!-- Ensure delimited by hyphen to remove leading and trailing whitespace. -->
|
||||
|
||||
{{- if $.Site.Params.createdDatePrefix -}}
|
||||
{{- $.Site.Params.createdDatePrefix -}}
|
||||
|
||||
{{- end -}}
|
||||
|
||||
{{- .Date.Format (or .Params.dateFormat $.Site.Params.dateFormat "2006-01-02") -}}
|
||||
|
|
Loading…
Add table
Reference in a new issue