Extract code groups into a partial and display them for entire files and raw files.

This commit is contained in:
2021-01-17 18:23:43 -08:00
parent d1ea7b5364
commit 5d0920cb6d
7 changed files with 31 additions and 18 deletions

View File

@@ -1 +1,2 @@
<pre><code>{{ readFile (printf "code/%s" (.Get 0)) }}</code></pre>
{{ partial "geturl.html" (dict "scratch" .Scratch "path" (.Get 0) "submoduleLinks" .Site.Params.submoduleLinks) }}
{{ partial "group.html" (dict "url" (.Scratch.Get "bestUrl") "path" (.Get 0) "comment" ", entire file" "content" (safeHTML (printf "<pre><code>%s</code></pre>" (readFile (printf "code/%s" (.Get 0)))))) }}