diff --git a/config.toml b/config.toml index ed92040..002771b 100644 --- a/config.toml +++ b/config.toml @@ -61,10 +61,10 @@ expiryDate = ["expiryDate"] [params] - dateform = "2 Jan 2006" - dateformShort = "2 Jan" - dateformNum = "2006-01-02" - dateformNumTime = "2006-01-02 15:04 -0700" + LongDate = "2 Jan 2006" + ShortDate = "2 Jan" + NumDateShort = "2006-01-02" + NumDateLong = "2006-01-02 15:04 -0700" description = "Daniel Kraus' personal homepage" # images = [""] diff --git a/layouts/partials/posts_single_info.html b/layouts/partials/posts_single_info.html index fa8906b..a75e989 100644 --- a/layouts/partials/posts_single_info.html +++ b/layouts/partials/posts_single_info.html @@ -9,12 +9,12 @@ {{- with .Params.categories }}

{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}{{.}}{{- end }}

{{- end }} -

{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ .Date.Format .Site.Params.dateformNumTime }} +

{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ .Date.Format .Site.Params.NumDateLong }} {{- if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}} {{ if and .GitInfo .Site.Params.gitUrl }} - ({{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}{{ .GitInfo.AbbreviatedHash -}} @ {{ .GitInfo.AuthorDate.Local.Format .Site.Params.dateformNum -}}) + ({{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}{{ .GitInfo.AbbreviatedHash -}} @ {{ .GitInfo.AuthorDate.Local.Format .Site.Params.NumDateShort -}}) {{- else if not (eq .Lastmod .Date ) -}} -  [{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}] +  [{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.NumDateLong .Lastmod.Local -}}] {{- else -}} {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} {{- end -}} diff --git a/layouts/shortcodes/git-info.html b/layouts/shortcodes/git-info.html index b4e4dbd..631d7d8 100644 --- a/layouts/shortcodes/git-info.html +++ b/layouts/shortcodes/git-info.html @@ -1,10 +1,10 @@

- {{ partial "svg.html" (dict "context" . "name" "posts_single_date") }} {{ dateFormat .Site.Params.dateformNumTime .Page.Date.Local }} + {{ partial "svg.html" (dict "context" . "name" "posts_single_date") }} {{ dateFormat .Site.Params.NumDateLong .Page.Date.Local }} {{ if and (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) }} {{ if and .GitInfo .Site.Params.gitUrl }} [{{ partial "svg.html" (dict "context" . "name" "posts_single_git_commit") }}{{ .Page.GitInfo.AbbreviatedHash -}} @ {{ dateFormat .Site.Params.dateformNum .Page.GitInfo.AuthorDate.Local }}] {{ else if not (eq .Page.Lastmod .Page.Date ) }} -  [{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Page.Lastmod.Local }}] +  [{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.NumDateLong .Page.Lastmod.Local }}] {{ else }} {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} {{ end }}