Files
George Cushen f4280ddb1c refactor: rename modules and update migration docs
BREAKING CHANGE
Module paths moved to `github.com/HugoBlox/kit` with new names:
- core `blox-tailwind` → `blox`
- analytics → `analytics`
- netlify → `integrations/netlify`
- slides (reveal) → `slides`
Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
2026-01-02 20:59:48 +00:00

22 lines
760 B
HTML

{{/* Function to inject custom code into layouts without overriding files. */}}
{{/* Input: hook folder name (str) */}}
{{/* Output: loaded (bool) */}}
{{ $loaded := false }}
{{ $partial_dir := printf "hooks/%s/" .hook }}
{{ $context := .context }}
{{ $hook_dir_path := path.Join "layouts/_partials" $partial_dir }}
{{ with try (os.ReadDir $hook_dir_path) }}
{{ with .Value }}
{{ range . }}
{{ if not .IsDir }}
{{ $partial_path := path.Join $partial_dir .Name }}
{{ partial $partial_path $context }}
{{ $loaded = true }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{/* The return statement below is for debug purposes only and prevents the above partial(s) being included in the page */}}
{{/* return $loaded */}}