summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--layouts/partials/functions/get_hook.html8
1 files 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