From 4c41e477e13d37e187c8de4225c7e8056bd9ed28 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Mon, 29 Sep 2025 19:17:13 +0200 Subject: Internalise theme --- layouts/partials/utils/icon.html | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 layouts/partials/utils/icon.html (limited to 'layouts/partials/utils/icon.html') diff --git a/layouts/partials/utils/icon.html b/layouts/partials/utils/icon.html new file mode 100644 index 0000000..7f72418 --- /dev/null +++ b/layouts/partials/utils/icon.html @@ -0,0 +1,7 @@ +{{- $iconFile := resources.GetMatch (printf "icons/%s.svg" .) -}} + +{{- if $iconFile -}} + {{- $iconFile.Content | safeHTML -}} +{{- else -}} + {{- errorf "Error: icon '%s.svg' is not found under 'assets/icons' folder" . -}} +{{- end -}} \ No newline at end of file -- cgit v1.3