New way to generate UIDs.

This commit is contained in:
MaikelChan committed 2024-01-13 01:24:45 +01:00
1 parent 08305fe2f7
commit 9cfc07565c
7 files changed
+19 -7

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
{{ $uid := .Page.RelPermalink }}
{{ $ctx := . }}
{{ range seq 16 }}
{{ with $ctx }}
{{ $uid = printf "%s-%d" $uid .Ordinal }}
{{ $ctx = .Parent }}
{{ else }}
{{ break }}
{{ end }}
{{ end }}
{{ return md5 $uid }}