diff --git a/layouts/partials/highlightgroup.html b/layouts/partials/highlightgroup.html
index 1ffc9bc..86ce47b 100644
--- a/layouts/partials/highlightgroup.html
+++ b/layouts/partials/highlightgroup.html
@@ -1,5 +1,6 @@
+{{- page.Scratch.Set "highlightGroupAttrs" (printf "data-base-path=\"%s\" data-file-path=\"%v\"" .basePath .path) -}}
{{- if (or .firstLine .lastLine) -}}
-{{- page.Scratch.Set "highlightGroupAttrs" (printf "data-first-line=\"%v\" data-last-line=\"%v\" data-base-path=\"%s\" data-file-path=\"%v\"" .firstLine .lastLine .basePath .path) -}}
+{{- page.Scratch.Add "highlightGroupAttrs" (printf " data-first-line=\"%v\" data-last-line=\"%v\"" .firstLine .lastLine) -}}
{{- end -}}
{{- if eq .language "Agda" -}}
{{- page.Scratch.Add "highlightGroupAttrs" " data-agda-block" -}}