vault page

This commit is contained in:
Yuri Zamyatin 2024-12-07 16:06:52 +00:00
parent 16cae0ddcb
commit f91c80ddaf
3 changed files with 11 additions and 6 deletions
archetypes
layouts/_default

View File

@ -15,6 +15,7 @@ sections:
link: # /<section>/
icon: # localpath from assets/icons/ w/o ext
# ...
vaultPageLink: # /<somename.md>/
notice:
# generator settings, no need to edit

View File

@ -1,7 +1,6 @@
{{ $hook_ctx := . }}
{{ with .Page.Resources.Get .Destination | resources.Copy (replaceRE "([^/]*)$" "_$1" (path.Join .Page.Path .Destination)) | fingerprint }}
<figure>
<a href="{{ .RelPermalink }}"><img src="{{ .RelPermalink }}"></a>
{{- with $hook_ctx.Text }}<figcaption>{{ . }}</figcaption>{{ end -}}
{{- with $.Text }}<figcaption>{{ . }}</figcaption>{{ end -}}
</figure>
{{ end }}

View File

@ -4,10 +4,12 @@
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
{{ if .Description }}<p>{{ .Description }}</p>{{ end }}
{{ partial "taxo_of_single.html" . }}
{{ if .Lastmod }}
<div class="pub-date">
mtime={{ .Lastmod.Format .Site.Params.dateFormat }}
archived={{ default false .Params.archived }}
</div>
{{ end }}
</div>
{{- end -}}
@ -30,8 +32,11 @@
{{- end -}}
{{- define "footer" -}}
<!--div class="content post">
<a href="">download</a> |
<a href="{{ relURL "/verification/" }}">verify</a>
</div-->
<div class="content post">
{{ with .Site.GetPage .Site.Home.Params.vaultPageLink}}
{{ if not (.Eq $.Page) }}
<a href="{{ .RelPermalink }}">save or verify</a>
{{ end }}
{{ end }}
</div>
{{- end -}}