Merge pull request #1164 from MaikelChan/uid

New way to generate UIDs.
This commit is contained in:
Nuno Coração
2024-01-14 23:26:45 +00:00
committed by GitHub
7 changed files with 19 additions and 7 deletions
+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 }}