summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/functions
diff options
context:
space:
mode:
Diffstat (limited to 'themes/blowfish/layouts/partials/functions')
-rw-r--r--themes/blowfish/layouts/partials/functions/date.html1
-rw-r--r--themes/blowfish/layouts/partials/functions/uid.html13
2 files changed, 14 insertions, 0 deletions
diff --git a/themes/blowfish/layouts/partials/functions/date.html b/themes/blowfish/layouts/partials/functions/date.html
new file mode 100644
index 0000000..d9ae543
--- /dev/null
+++ b/themes/blowfish/layouts/partials/functions/date.html
@@ -0,0 +1 @@
+{{ return time.Format (site.Language.Params.dateFormat | default ":date_long") . }}
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