From 3865ee6a19512126dccda3039e03020dc7b1e430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corn=C3=A9=20Haasjes?= Date: Tue, 1 Apr 2025 20:31:57 +0200 Subject: [PATCH] Fix get_hook function --- layouts/partials/functions/get_hook.html | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/layouts/partials/functions/get_hook.html b/layouts/partials/functions/get_hook.html index 79c9987..3e6b4fb 100644 --- a/layouts/partials/functions/get_hook.html +++ b/layouts/partials/functions/get_hook.html @@ -9,15 +9,11 @@ {{ $hook := .hook }} {{ $context := .context }} -{{ $hookName := $hook.Name }} -{{ $hookType := $hook.Type }} {{ if not (hasSuffix $hook ".html") }} {{ $hook = printf "%s.html" $hook }} {{ end }} -{{ $hook_path := path.Join "layouts/partials/hooks" $hook }} - -{{ if fileExists $hook_path }} - {{ partial $hook_path $context }} +{{ if fileExists (path.Join "layouts/partials/hooks" $hook) }} + {{ partial (path.Join "hooks" $hook) $context }} {{ end }} \ No newline at end of file