aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/card-id.html
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-11-21 11:23:56 -0500
committertdro <tdro@noreply.example.com>2022-11-21 11:23:56 -0500
commit8113e9c39376d1e9fb1c239a678a7502272e8fda (patch)
treefc1e9263021d886db60a1b22d3cfee3b7bfa410d /themes/default/layouts/partials/card-id.html
parent4a82e6046ab0e8cf65a089a7b1e85c6ef918666c (diff)
downloadcanory-8113e9c39376d1e9fb1c239a678a7502272e8fda.tar.gz
canory-8113e9c39376d1e9fb1c239a678a7502272e8fda.tar.bz2
canory-8113e9c39376d1e9fb1c239a678a7502272e8fda.zip
themes/default/layouts: Use hashing algorithm consistently
Avoid using shuffle in short codes by appending .Ordinal value
Diffstat (limited to 'themes/default/layouts/partials/card-id.html')
-rw-r--r--themes/default/layouts/partials/card-id.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/card-id.html b/themes/default/layouts/partials/card-id.html
index 2675e90..b1ee3fc 100644
--- a/themes/default/layouts/partials/card-id.html
+++ b/themes/default/layouts/partials/card-id.html
@@ -2,6 +2,6 @@
{{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}}
{{- $source := urlize (humanize $relURL) -}}
{{- if .ExpiryDate -}}
- {{- $source = md5 $source -}}
+ {{- $source = truncate 8 "" (sha256 $source) -}}
{{- end -}}
{{- $source -}}