Update hermit-v2.

Add git-info shortcode.
This commit is contained in:
daniel 2024-11-05 15:28:59 +01:00
parent 2e8e9f5f93
commit 503b7b134f
2 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
<p>
{{ partial "svg.html" (dict "context" . "name" "posts_single_date") }} {{ dateFormat .Site.Params.dateformNumTime .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") }}<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 ) }}
&nbsp;[{{.Site.Params.initialPublish | default "Initial Published on : "}} {{ dateFormat .Site.Params.dateformNumTime .Page.Lastmod.Local }}]
{{ else }}
{{ errorf "Lastmod is not found in Page Frontmatter or Lastmod is same as Date" }}
{{ end }}
{{ end }}
</p>

@ -1 +1 @@
Subproject commit 5a041686f7848416c66d89a6d101e373a6d5de14
Subproject commit a01afdd69a7dfc2cd5c2813e2b324046f68effe6