fix(srcatch): fix srcatch bugs
This commit is contained in:
6
layouts/partials/function/id.html
Normal file
6
layouts/partials/function/id.html
Normal file
@@ -0,0 +1,6 @@
|
||||
{{- /* ID */ -}}
|
||||
{{- /* Content -> unique ID */ -}}
|
||||
{{- /* shuffle md5 as id */ -}}
|
||||
{{- $id := delimit (split (md5 now.Unix) "" | shuffle | first 6) "" | printf "id-%s" -}}
|
||||
{{- .scratch.SetInMap "contentMap" $id .content -}}
|
||||
{{- return $id -}}
|
||||
Reference in New Issue
Block a user