Fix site to use current hermit-v2 theme.

Affects date formats.
This commit is contained in:
2025-08-02 07:37:08 +02:00
parent 8b3dd97e27
commit f787cc0619
3 changed files with 9 additions and 9 deletions

View File

@ -61,10 +61,10 @@ expiryDate = ["expiryDate"]
[params] [params]
dateform = "2 Jan 2006" LongDate = "2 Jan 2006"
dateformShort = "2 Jan" ShortDate = "2 Jan"
dateformNum = "2006-01-02" NumDateShort = "2006-01-02"
dateformNumTime = "2006-01-02 15:04 -0700" NumDateLong = "2006-01-02 15:04 -0700"
description = "Daniel Kraus' personal homepage" description = "Daniel Kraus' personal homepage"
# images = [""] # images = [""]

View File

@ -9,12 +9,12 @@
{{- with .Params.categories }} {{- with .Params.categories }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}<span class="category"><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>{{- end }}</p> <p>{{- partial "svg.html" (dict "context" . "name" "posts_single_categories") -}}{{- range . -}}<span class="category"><a href="{{ "categories/" | absLangURL }}{{ . | urlize }}">{{.}}</a></span>{{- end }}</p>
{{- end }} {{- end }}
<p>{{- partial "svg.html" (dict "context" . "name" "posts_single_date") }}{{ .Date.Format .Site.Params.dateformNumTime }} <p>{{- 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 (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) -}}
{{ if and .GitInfo .Site.Params.gitUrl }} {{ if and .GitInfo .Site.Params.gitUrl }}
({{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash -}}</a> @ {{ .GitInfo.AuthorDate.Local.Format .Site.Params.dateformNum -}}) ({{- partial "svg.html" (dict "context" . "name" "posts_single_git_commit") -}}<a href="{{ .Site.Params.gitUrl -}}{{ .GitInfo.Hash }}" target="_blank" rel="noopener">{{ .GitInfo.AbbreviatedHash -}}</a> @ {{ .GitInfo.AuthorDate.Local.Format .Site.Params.NumDateShort -}})
{{- else if not (eq .Lastmod .Date ) -}} {{- else if not (eq .Lastmod .Date ) -}}
&nbsp;[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Lastmod.Local -}}] &nbsp;[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.NumDateLong .Lastmod.Local -}}]
{{- else -}} {{- else -}}
{{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }}
{{- end -}} {{- end -}}

View File

@ -1,10 +1,10 @@
<p> <p>
{{ 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 (not (eq .Page.Params.ShowLastmod nil)) (.Page.Params.ShowLastmod) }}
{{ if and .GitInfo .Site.Params.gitUrl }} {{ if and .GitInfo .Site.Params.gitUrl }}
[{{ partial "svg.html" (dict "context" . "name" "posts_single_git_commit") }}<a href="{{ .Site.Params.gitUrl -}}{{ .Page.GitInfo.Hash }}" target="_blank" rel="noopener">{{ .Page.GitInfo.AbbreviatedHash -}}</a> @ {{ dateFormat .Site.Params.dateformNum .Page.GitInfo.AuthorDate.Local }}] [{{ partial "svg.html" (dict "context" . "name" "posts_single_git_commit") }}<a href="{{ .Site.Params.gitUrl -}}{{ .Page.GitInfo.Hash }}" target="_blank" rel="noopener">{{ .Page.GitInfo.AbbreviatedHash -}}</a> @ {{ dateFormat .Site.Params.dateformNum .Page.GitInfo.AuthorDate.Local }}]
{{ else if not (eq .Page.Lastmod .Page.Date ) }} {{ else if not (eq .Page.Lastmod .Page.Date ) }}
&nbsp;[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Page.Lastmod.Local }}] &nbsp;[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.NumDateLong .Page.Lastmod.Local }}]
{{ else }} {{ else }}
{{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }} {{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }}
{{ end }} {{ end }}