cullmann.io/themes/blowfish/layouts/partials/functions/uid.html

13 lines
231 B
HTML
Raw Normal View History

{{ $uid := .Page.RelPermalink }}
{{ $ctx := . }}
{{ range seq 16 }}
{{ with $ctx }}
{{ $uid = printf "%s-%d" $uid .Ordinal }}
{{ $ctx = .Parent }}
{{ else }}
{{ break }}
{{ end }}
{{ end }}
{{ return md5 $uid }}