Use Hugo's partial-returning where possible
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
{{- $scratch := newScratch -}}
|
||||
{{- partial "geturl.html" (dict "scratch" $scratch "path" (.Get 0) "siteSourceUrl" .Site.Params.siteSourceUrl "submoduleLinks" hugo.Data.submodules) -}}
|
||||
{{- $url := partial "geturl.html" (dict "path" (.Get 0)) -}}
|
||||
{{- $groupconfig := dict
|
||||
"url" ($scratch.Get "bestUrl")
|
||||
"basePath" ($scratch.Get "bestPath")
|
||||
"url" $url.url
|
||||
"basePath" $url.basePath
|
||||
"path" (.Get 0)
|
||||
"comment" ", entire file"
|
||||
"content" (safeHTML (printf "<pre><code>%s</code></pre>" (htmlEscape (readFile (printf "code/%s" (.Get 0))))))
|
||||
|
||||
Reference in New Issue
Block a user