diff --git a/layouts/_default/docs.html b/layouts/_default/docs.html
index 3b66e9a..cfd11f4 100644
--- a/layouts/_default/docs.html
+++ b/layouts/_default/docs.html
@@ -5,59 +5,8 @@
{{ partial "sidebar.html" . }}
- {{$content := .Content}}
- {{$pattern := `]*class=["'][^"']*(?:fas?|fa-solid|fa-regular|fa-brands|far)\s+fa-([^"'\s]+)[^"']*["'][^>]*?(?:\s+style=["']([^"']*)["'])?[^>]*>`}}
- {{$matches := findRE $pattern $content}}
-
- {{range $matches}}
- {{$currentMatch := .}}
- {{$iconName := ""}}
- {{$styleAttr := ""}}
-
- {{$submatches := findRESubmatch $pattern $currentMatch}}
- {{if gt (len $submatches) 0}}
- {{$iconName = index (index $submatches 0) 1}}
- {{$styleAttr = index (index $submatches 0) 2}}
-
- {{- $iconMappings := dict
- "bug-slash" "bug-off"
- "circle-info" "info"
- "info-circle" "info"
- "file-circle-plus" "file-plus"
- "check-circle" "circle-check"
- "heartbeat" "heart-pulse"
- "code-branch" "git-branch"
- "desktop" "monitor"
- "certificate" "badge"
- "cogs" "cog"
- "shield-alt" "shield-half"
- "memory" "cpu"
- "hdd" "hard-drive"
- "exclamation-triangle" "triangle-alert"
- "triangle-exclamation" "triangle-alert"
- "tachometer-alt" "circle-gauge"
- "circle-exclamation" "circle-alert"
- "arrow-up-right-from-square" "external-link"
- "pen-to-square" "square-pen"
- "flask" "flask-conical"
- -}}
-
- {{ with index $iconMappings $iconName }}
- {{$iconName = .}}
- {{ end }}
-
- {{$iconHTML := partial "lucide" (dict
- "context" $
- "icon" $iconName
- "style" $styleAttr
- )}}
-
- {{ $modifiedMatch := replaceRE `>` ` data-mf=false>` $currentMatch 1}}
- {{ $modifiedMFIcon := printf "%s %s" $modifiedMatch $iconHTML }}
- {{$content = replace $content $currentMatch $modifiedMFIcon}}
-
- {{end}}
- {{end}}
+
+ {{ $content := partial "icon-replacement.html" (dict "content" .Content) }}
{{if (.Params.catalog) }}
diff --git a/layouts/partials/icon-replacement.html b/layouts/partials/icon-replacement.html
new file mode 100644
index 0000000..8ae25c4
--- /dev/null
+++ b/layouts/partials/icon-replacement.html
@@ -0,0 +1,54 @@
+{{ $content := .content }}
+{{ $pattern := `]*class=["'][^"']*(?:fas?|fa-solid|fa-regular|fa-brands|far)\s+fa-([^"'\s]+)[^"']*["'][^>]*?(?:\s+style=["']([^"']*)["'])?[^>]*>` }}
+{{ $matches := findRE $pattern $content }}
+
+{{range $matches}}
+ {{$currentMatch := .}}
+ {{$iconName := ""}}
+ {{$styleAttr := ""}}
+
+ {{$submatches := findRESubmatch $pattern $currentMatch}}
+ {{if gt (len $submatches) 0}}
+ {{$iconName = index (index $submatches 0) 1}}
+ {{$styleAttr = index (index $submatches 0) 2}}
+
+ {{- $iconMappings := dict
+ "bug-slash" "bug-off"
+ "circle-info" "info"
+ "info-circle" "info"
+ "file-circle-plus" "file-plus"
+ "check-circle" "circle-check"
+ "heartbeat" "heart-pulse"
+ "code-branch" "git-branch"
+ "desktop" "monitor"
+ "certificate" "badge"
+ "cogs" "cog"
+ "shield-alt" "shield-half"
+ "memory" "cpu"
+ "hdd" "hard-drive"
+ "exclamation-triangle" "triangle-alert"
+ "triangle-exclamation" "triangle-alert"
+ "tachometer-alt" "circle-gauge"
+ "circle-exclamation" "circle-alert"
+ "arrow-up-right-from-square" "external-link"
+ "pen-to-square" "square-pen"
+ "flask" "flask-conical"
+ -}}
+
+ {{ with index $iconMappings $iconName }}
+ {{$iconName = .}}
+ {{ end }}
+
+ {{$iconHTML := partial "lucide" (dict
+ "context" $
+ "icon" $iconName
+ "style" $styleAttr
+ )}}
+
+ {{ $modifiedMatch := replaceRE `>` ` data-mf=false>` $currentMatch 1 }}
+ {{ $modifiedMFIcon := printf "%s %s" $modifiedMatch $iconHTML }}
+ {{ $content = replace $content $currentMatch $modifiedMFIcon }}
+ {{end}}
+{{end}}
+
+{{ return $content }}
\ No newline at end of file