diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
index f5003c2..f2f972a 100644
--- a/layouts/partials/icon.html
+++ b/layouts/partials/icon.html
@@ -1,6 +1 @@
-{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
-{{- $icon := $icon_resource.Content -}}
-{{- $icon = replaceRE `` .) $icon -}}
-{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
-{{- $icon | safeHTML -}}
+{{ partialCached "icon_code.html" . . }}
diff --git a/layouts/partials/icon_code.html b/layouts/partials/icon_code.html
new file mode 100644
index 0000000..f5003c2
--- /dev/null
+++ b/layouts/partials/icon_code.html
@@ -0,0 +1,6 @@
+{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
+{{- $icon := $icon_resource.Content -}}
+{{- $icon = replaceRE `` .) $icon -}}
+{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
+{{- $icon | safeHTML -}}