Breaking Change: replace BookEditPath with BookLastChangeLink and BookEditLink tempaltes

This commit is contained in:
Alex Shpak
2025-08-03 21:40:26 +02:00
parent 7bd4d673cc
commit 2b0d7ffa26
8 changed files with 76 additions and 74 deletions
@@ -0,0 +1,9 @@
<!--
Returns rendered string from template and context.
Usage: partial "docs/string-template" (dict "Template" "param={{ . }}" "Context" "Input")
-->
{{- $checksum := . | encoding.Jsonify | crypto.SHA1 | printf "book-%s" -}}
{{- $template := resources.FromString $checksum .Template -}}
{{- $template = $template | resources.ExecuteAsTemplate $checksum .Context -}}
{{- return $template.Content -}}