summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/functions/uid.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/blowfish/layouts/partials/functions/uid.html')
-rw-r--r--themes/blowfish/layouts/partials/functions/uid.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/functions/uid.html b/themes/blowfish/layouts/partials/functions/uid.html
new file mode 100644
index 0000000..f4269dc
--- /dev/null
+++ b/themes/blowfish/layouts/partials/functions/uid.html
@@ -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 }} \ No newline at end of file