summaryrefslogtreecommitdiff
path: root/themes/hugo-book/layouts/_partials/docs/text/template.html
blob: 53e535d0e91180da234cd4acb437981f01480220 (plain)
1
2
3
4
5
6
7
8
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 -}}
Directive (EU) 2019/790, Article 4(3); all rights regarding Text and Data Mining (TDM) are reserved.