Use Hugo's partial-returning where possible

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2026-05-18 21:15:19 -07:00
parent 2032e1cdc2
commit 19550ef1b2
12 changed files with 46 additions and 55 deletions

View File

@@ -1,8 +1,7 @@
{{- $scratch := newScratch -}}
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 1)) -}}
{{- $url := partial "geturl.html" (dict "path" (.Get 1)) -}}
{{- $groupconfig := dict
"url" ($scratch.Get "bestUrl")
"basePath" ($scratch.Get "bestPath")
"url" $url.url
"basePath" $url.basePath
"path" (.Get 1)
"comment" ", entire file"
"code" (readFile (printf "code/%s" (.Get 1)))