diff --git a/layouts/shortcodes/codeblock.html b/layouts/shortcodes/codeblock.html
index a8a432c..722b746 100644
--- a/layouts/shortcodes/codeblock.html
+++ b/layouts/shortcodes/codeblock.html
@@ -1,2 +1,10 @@
{{ partial "geturl.html" (dict "scratch" .Scratch "path" (.Get 1) "siteSourceUrl" .Site.Params.siteSourceUrl "submoduleLinks" .Site.Data.submodules) }}
-{{ partial "highlightgroup.html" (dict "url" (.Scratch.Get "bestUrl") "path" (.Get 1) "comment" ", entire file" "code" (readFile (printf "code/%s" (.Get 1))) "language" (.Get 0) "opts" "linenos=table") }}
+{{ $groupconfig := dict
+ "url" (.Scratch.Get "bestUrl")
+ "path" (.Get 1)
+ "comment" ", entire file"
+ "code" (readFile (printf "code/%s" (.Get 1)))
+ "language" (.Get 0)
+ "opts" "linenos=table"
+}}
+{{ partial "highlightgroup.html" $groupconfig }}
diff --git a/layouts/shortcodes/codelines.html b/layouts/shortcodes/codelines.html
index bdab526..76e27e1 100644
--- a/layouts/shortcodes/codelines.html
+++ b/layouts/shortcodes/codelines.html
@@ -23,7 +23,17 @@
{{ with (.Scratch.Get "hidden") }}
{{ . | markdownify }}
{{ end }}
-{{ partial "highlightgroup.html" (dict "url" (.Scratch.Get "bestUrl") "path" (.Get 1) "comment" (.Scratch.Get "comment") "code" (delimit $lines "\n") "language" (.Get 0) "opts" (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts"))) }}
+{{ $groupconfig := dict
+ "url" (.Scratch.Get "bestUrl")
+ "path" (.Get 1)
+ "comment" (.Scratch.Get "comment")
+ "code" (delimit $lines "\n")
+ "firstLine" (int (.Get 2))
+ "lastLine" (int (.Get 3))
+ "language" (.Get 0)
+ "opts" (printf "linenos=table,linenostart=%d%s" (.Get 2) (.Scratch.Get "opts"))
+}}
+{{ partial "highlightgroup.html" $groupconfig }}
{{ with (.Scratch.Get "hidden") }}
{{ end }}