summaryrefslogtreecommitdiff
path: root/themes/blowfish/layouts/partials/functions
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-04-28 17:33:09 +0200
commite77051ccc4b47951bfa4fde2be436b1bb2fb113b (patch)
treef0b75ee3521da9c8cd39dac4359212348f70e4e8 /themes/blowfish/layouts/partials/functions
parent4b355837824ac2422d371acef790f0f4249255c7 (diff)
use https://github.com/nunocoracao/blowfish.git
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