Files
libertytoolsio/themes/hugo-book.backup/layouts/_partials/docs/text/template.html

9 lines
403 B
HTML
Raw Normal View History

<!--
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 -}}